Skip to content

Commit

Permalink
fix(install): fix process.stderr
Browse files Browse the repository at this point in the history
  • Loading branch information
watilde committed Aug 3, 2017
1 parent ad5df92 commit 1bbd3ad
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions lib/install.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ const resolver = require('./install/resolver')
const installer = require('./install/installer')
const nodeGyp = require('./utils/node-gyp')
const rimraf = require('rimraf')
const nm = require('./utils/nm')

global.dependenciesCount = 0
global.dependenciesTree = {}
Expand All @@ -26,6 +27,7 @@ const install = (argv) => {
Promise.all(list).then(() => {
const tasks = installer(global.dependenciesTree)
process.stdout.write('Installing dependencies\n')
rimraf(nm)
Promise.all(tasks).then(() => {
global.nativeBuildQueue.forEach((cwd) => {
try {
Expand All @@ -42,8 +44,8 @@ const install = (argv) => {
process.stdout.write(
`Installed ${global.dependenciesCount} packages in ${s}s\n`
)
}).catch((e) => { process.stderr(e.stack) })
}).catch((e) => { process.stderr(e.stack) })
}).catch((e) => { process.stderr.write(e.stack) })
}).catch((e) => { process.stderr.write(e.stack) })
}

module.exports = {
Expand Down
2 changes: 1 addition & 1 deletion lib/lock.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const lock = (argv) => {
process.stdout.write(
`created node_modules.json\n`
)
}).catch((e) => { process.stderr(e.stack) })
}).catch((e) => { process.stderr.write(e.stack) })
}

module.exports = {
Expand Down

0 comments on commit 1bbd3ad

Please sign in to comment.