Skip to content
This repository was archived by the owner on Apr 7, 2021. It is now read-only.

Commit d2ecba3

Browse files
committed
fix(rimraf): fix rimraf.sync is not a function issue
Fixes: #61
1 parent d9be396 commit d2ecba3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,9 @@ function ensurePackages (specs, opts) {
135135
const bins = process.platform === 'win32'
136136
? prefix
137137
: path.join(prefix, 'bin')
138-
const rimraf = promisify(require('rimraf'))
138+
const rimraf = require('rimraf')
139139
process.on('exit', () => rimraf.sync(prefix))
140-
return rimraf(bins).then(() => {
140+
return promisify(rimraf)(bins).then(() => {
141141
return installPackages(specs, prefix, opts)
142142
}).then(info => {
143143
// This will make temp bins _higher priority_ than even local bins.

0 commit comments

Comments
 (0)