Cscott has uploaded a new change for review.
https://gerrit.wikimedia.org/r/170033
Change subject: Be quiet when unzipping; don't create pipes in `P.spawn`.
......................................................................
Be quiet when unzipping; don't create pipes in `P.spawn`.
Both these changes ensure that we don't block for pipe input when
unzipping large bundles.
Change-Id: Id4e14b7e4670b0d977a7cd6bc718aa0f953ab91e
---
M lib/index.js
M lib/p.js
2 files changed, 2 insertions(+), 2 deletions(-)
git pull
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Collection/OfflineContentGenerator/zim_renderer
refs/changes/33/170033/1
diff --git a/lib/index.js b/lib/index.js
index bc0fa6b..25def2d 100644
--- a/lib/index.js
+++ b/lib/index.js
@@ -72,7 +72,7 @@
}).tap(function(builddir) {
// now unpack the zip archive
var bundledir = path.join(builddir, 'bundle');
- return P.spawn('unzip', [ path.resolve( options.bundle ) ], {
+ return P.spawn('unzip', [ '-q', path.resolve( options.bundle )
], {
cwd: bundledir
});
});
diff --git a/lib/p.js b/lib/p.js
index f245e27..1a997ea 100644
--- a/lib/p.js
+++ b/lib/p.js
@@ -18,7 +18,7 @@
// Returns a promise for completion after spawning `program`
P.spawn = function(program, args, options) {
return new Promise(function(resolve, reject) {
- spawn(program, args || [], options || {}).
+ spawn(program, args || [], options || { stdio: 'inherit' }).
on('exit', function(exitCode) {
if (exitCode === 0) {
resolve();
--
To view, visit https://gerrit.wikimedia.org/r/170033
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id4e14b7e4670b0d977a7cd6bc718aa0f953ab91e
Gerrit-PatchSet: 1
Gerrit-Project:
mediawiki/extensions/Collection/OfflineContentGenerator/zim_renderer
Gerrit-Branch: master
Gerrit-Owner: Cscott <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits