Skip to content

Commit e445540

Browse files
suiyun39ruyadorno
authored andcommitted
fix: on uninstall package, *.ps1 not delete
PR-URL: #281 Credit: @NoDocCat Close: #281 Reviewed-by: @ruyadorno
1 parent d3cb3ab commit e445540

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

lib/unbuild.js

+5-2
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,11 @@ function rmBins (pkg, folder, parent, top, cb) {
7878
const binRoot = top ? npm.bin : path.resolve(parent, '.bin')
7979
asyncMap(Object.keys(pkg.bin), function (b, cb) {
8080
if (process.platform === 'win32') {
81-
chain([ [gentlyRm, path.resolve(binRoot, b) + '.cmd', true, folder],
82-
[gentlyRm, path.resolve(binRoot, b), true, folder] ], cb)
81+
chain([
82+
[gentlyRm, path.resolve(binRoot, b) + '.ps1', true, folder],
83+
[gentlyRm, path.resolve(binRoot, b) + '.cmd', true, folder],
84+
[gentlyRm, path.resolve(binRoot, b), true, folder]
85+
], cb)
8386
} else {
8487
gentlyRm(path.resolve(binRoot, b), true, folder, cb)
8588
}

0 commit comments

Comments
 (0)