Skip to content

Commit 820b297

Browse files
martinrrmCopilot
andcommitted
Co-authored-by: Copilot <[email protected]> Copilot-Session: 330b549f-83dd-4218-81b7-003cc008f869
1 parent 9196a4c commit 820b297

4 files changed

Lines changed: 18 additions & 11 deletions

File tree

‎node_modules/@npmcli/promise-spawn/lib/index.js‎

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,20 +83,27 @@ const spawnWithShell = (cmd, args, opts, extra) => {
8383
if (isCmd) {
8484
let doubleEscape = false
8585

86-
// find the actual command we're running
86+
// Decode the executable token so escaped batch shims still get double escaping.
8787
let initialCmd = ''
8888
let insideQuotes = false
8989
for (let i = 0; i < cmd.length; ++i) {
9090
const char = cmd.charAt(i)
91+
if (char === '^' && !insideQuotes && i + 1 < cmd.length) {
92+
initialCmd += cmd.charAt(++i)
93+
continue
94+
}
9195
if (char === ' ' && !insideQuotes) {
9296
break
9397
}
9498

9599
initialCmd += char
96-
if (char === '"' || char === "'") {
100+
if (char === '"') {
97101
insideQuotes = !insideQuotes
98102
}
99103
}
104+
if (initialCmd.startsWith('"') && initialCmd.endsWith('"')) {
105+
initialCmd = initialCmd.slice(1, -1)
106+
}
100107

101108
let pathToInitial
102109
try {

‎node_modules/@npmcli/promise-spawn/package.json‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@npmcli/promise-spawn",
3-
"version": "10.0.0",
3+
"version": "10.0.1",
44
"files": [
55
"bin/",
66
"lib/"
@@ -32,8 +32,8 @@
3232
]
3333
},
3434
"devDependencies": {
35-
"@npmcli/eslint-config": "^6.0.0",
36-
"@npmcli/template-oss": "5.1.0",
35+
"@npmcli/eslint-config": "^7.0.0",
36+
"@npmcli/template-oss": "5.1.1",
3737
"spawk": "^1.7.1",
3838
"tap": "^16.0.1"
3939
},
@@ -42,7 +42,7 @@
4242
},
4343
"templateOSS": {
4444
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
45-
"version": "5.1.0",
45+
"version": "5.1.1",
4646
"publish": true
4747
},
4848
"dependencies": {

‎package-lock.json‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
"@npmcli/map-workspaces": "^6.0.0",
9595
"@npmcli/metavuln-calculator": "^10.0.0",
9696
"@npmcli/package-json": "^8.0.0",
97-
"@npmcli/promise-spawn": "^10.0.0",
97+
"@npmcli/promise-spawn": "^10.0.1",
9898
"@npmcli/redact": "^5.0.0",
9999
"@npmcli/run-script": "^11.0.0",
100100
"@sigstore/tuf": "^5.0.0",
@@ -1899,9 +1899,9 @@
18991899
}
19001900
},
19011901
"node_modules/@npmcli/promise-spawn": {
1902-
"version": "10.0.0",
1903-
"resolved": "https://registry.npmjs.org/@npmcli/promise-spawn/-/promise-spawn-10.0.0.tgz",
1904-
"integrity": "sha512-llZkSzeTsimFx64U+ThT2xQM2uEce8GIQUYvxgbB6ZFvBhV2LP9LeJJb3HT+syG0uCFLsTCHjV9SfC0WNU1vtA==",
1902+
"version": "10.0.1",
1903+
"resolved": "https://registry.npmjs.org/@npmcli/promise-spawn/-/promise-spawn-10.0.1.tgz",
1904+
"integrity": "sha512-IstFcKAoEIZ7olS9iTwBsyNOZkIturafO2da9ocSP3LifRlm1+sxuo8IVM5phg5sNe0tNYLT0ZqCBRTLNzz0AA==",
19051905
"inBundle": true,
19061906
"license": "ISC",
19071907
"dependencies": {

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
"@npmcli/map-workspaces": "^6.0.0",
5656
"@npmcli/metavuln-calculator": "^10.0.0",
5757
"@npmcli/package-json": "^8.0.0",
58-
"@npmcli/promise-spawn": "^10.0.0",
58+
"@npmcli/promise-spawn": "^10.0.1",
5959
"@npmcli/redact": "^5.0.0",
6060
"@npmcli/run-script": "^11.0.0",
6161
"@sigstore/tuf": "^5.0.0",

0 commit comments

Comments
 (0)