Skip to content
This repository has been archived by the owner on Jul 6, 2019. It is now read-only.

Commit

Permalink
fix(rimraf): fix rimraf.sync is not a function issue
Browse files Browse the repository at this point in the history
Fixes: #61
  • Loading branch information
zkat committed Jul 11, 2017
1 parent d9be396 commit d2ecba3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,9 @@ function ensurePackages (specs, opts) {
const bins = process.platform === 'win32'
? prefix
: path.join(prefix, 'bin')
const rimraf = promisify(require('rimraf'))
const rimraf = require('rimraf')
process.on('exit', () => rimraf.sync(prefix))
return rimraf(bins).then(() => {
return promisify(rimraf)(bins).then(() => {
return installPackages(specs, prefix, opts)
}).then(info => {
// This will make temp bins _higher priority_ than even local bins.
Expand Down

0 comments on commit d2ecba3

Please sign in to comment.