test(link-bins): fix

This commit is contained in:
Zoltan Kochan
2021-09-29 00:44:09 +03:00
parent 0d4a7c69e4
commit 1c7f80d9ec
3 changed files with 5 additions and 2 deletions

View File

@@ -52,6 +52,7 @@
"@types/node": "^14.14.33",
"@types/normalize-path": "^3.0.0",
"@types/ramda": "0.27.39",
"cmd-extension": "^1.0.2",
"ncp": "^2.0.0",
"path-exists": "^4.0.0",
"tempy": "^1.0.0"

View File

@@ -5,6 +5,7 @@ import path from 'path'
import linkBins, {
linkBinsOfPackages,
} from '@pnpm/link-bins'
import CMD_EXTENSION from 'cmd-extension'
import isWindows from 'is-windows'
import ncpcb from 'ncp'
import normalizePath from 'normalize-path'
@@ -33,7 +34,7 @@ function getExpectedBins (bins: string[]) {
bins.forEach((bin) => expectedBins.push(`${bin}.ps1`))
}
if (IS_WINDOWS) {
bins.forEach((bin) => expectedBins.push(`${bin}.cmd`))
bins.forEach((bin) => expectedBins.push(`${bin}${CMD_EXTENSION}`))
}
return expectedBins.sort()
}

3
pnpm-lock.yaml generated
View File

@@ -982,6 +982,7 @@ importers:
'@types/normalize-path': ^3.0.0
'@types/ramda': 0.27.39
'@zkochan/cmd-shim': ^5.2.1
cmd-extension: ^1.0.2
is-subdir: ^1.1.1
is-windows: ^1.0.2
ncp: ^2.0.0
@@ -1011,6 +1012,7 @@ importers:
'@types/node': 14.17.19
'@types/normalize-path': 3.0.0
'@types/ramda': 0.27.39
cmd-extension: 1.0.2
ncp: 2.0.0
path-exists: 4.0.0
tempy: 1.0.1
@@ -6739,7 +6741,6 @@ packages:
/cmd-extension/1.0.2:
resolution: {integrity: sha512-iWDjmP8kvsMdBmLTHxFaqXikO8EdFRDfim7k6vUHglY/2xJ5jLrPsnQGijdfp4U+sr/BeecG0wKm02dSIAeQ1g==}
engines: {node: '>=10'}
dev: false
/co/4.6.0:
resolution: {integrity: sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=}