Skip to content

Commit eae79d3

Browse files
committed
Improve error reporting from subprocesses
1 parent b041f89 commit eae79d3

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

bin/dump_wiki

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,6 @@ argv.host = argv.host.replace(/\/$/, '');
4141
argv.ns = Number(argv.ns);
4242

4343
return makeDump(argv)
44-
.then(function(res) {
45-
console.log('Dump done.');
46-
})
4744
.catch(function(err) {
4845
console.error('Error in main;', err);
4946
});

lib/dump_restbase.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,11 @@ function dumpWiki(options) {
4242
dumpOptions.push(options.verbose ? '--verbose' : '--no-verbose');
4343
return proc.execFileAsync('node', dumpOptions);
4444
})
45-
.then(function() {
46-
console.log('xz compressing');
45+
.then(function(res) {
46+
if (res[0] || res[1]) {
47+
console.log('Output from ', domain + ':', res[0], res[1]);
48+
}
49+
//console.log('xz compressing');
4750
return proc.execFileAsync('pixz', ['-2', workDB, dumpDB]);
4851
})
4952
.then(function() {

0 commit comments

Comments
 (0)