Skip to content

Commit 8cfc6a6

Browse files
authored
Update shell-quote to 1.8.3 (#562)
1 parent 4c403f8 commit 8cfc6a6

File tree

3 files changed

+38
-37
lines changed

3 files changed

+38
-37
lines changed

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,27 +58,27 @@
5858
"dependencies": {
5959
"chalk": "4.1.2",
6060
"rxjs": "7.8.2",
61-
"shell-quote": "1.8.1",
61+
"shell-quote": "1.8.3",
6262
"supports-color": "8.1.1",
6363
"tree-kill": "1.2.2",
6464
"yargs": "17.7.2"
6565
},
6666
"devDependencies": {
67-
"@eslint/js": "9.33.0",
67+
"@eslint/js": "^9.33.0",
6868
"@hirez_io/observer-spy": "^2.2.0",
6969
"@types/node": "^18.19.123",
7070
"@types/shell-quote": "^1.7.5",
7171
"@types/supports-color": "^8.1.3",
7272
"@types/yargs": "^17.0.33",
7373
"@vitest/coverage-v8": "^3.2.4",
74-
"@vitest/eslint-plugin": "1.3.4",
74+
"@vitest/eslint-plugin": "^1.3.4",
7575
"coveralls-next": "^5.0.0",
7676
"ctrlc-wrapper": "^0.0.5",
7777
"esbuild": "~0.25.9",
7878
"eslint": "^9.33.0",
79-
"eslint-config-flat-gitignore": "2.1.0",
79+
"eslint-config-flat-gitignore": "^2.1.0",
8080
"eslint-config-prettier": "^10.1.8",
81-
"eslint-plugin-import-lite": "0.3.0",
81+
"eslint-plugin-import-lite": "^0.3.0",
8282
"eslint-plugin-prettier": "^5.5.4",
8383
"eslint-plugin-simple-import-sort": "^12.1.1",
8484
"globals": "16.3.0",
@@ -88,7 +88,7 @@
8888
"safe-publish-latest": "^2.0.0",
8989
"string-argv": "^0.3.2",
9090
"typescript": "~5.9.2",
91-
"typescript-eslint": "8.40.0",
91+
"typescript-eslint": "^8.40.0",
9292
"vitest": "^3.2.4"
9393
},
9494
"files": [

pnpm-lock.yaml

Lines changed: 12 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/command-parser/expand-arguments.ts

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,27 @@ export class ExpandArguments implements CommandParser {
1717
if (match.startsWith('\\')) {
1818
return match.slice(1);
1919
}
20-
// Replace numeric placeholder if value exists in additional arguments.
21-
if (
22-
!isNaN(placeholderTarget) &&
23-
placeholderTarget <= this.additionalArguments.length
24-
) {
25-
return quote([this.additionalArguments[placeholderTarget - 1]]);
26-
}
27-
// Replace all arguments placeholder.
28-
if (placeholderTarget === '@') {
29-
return quote(this.additionalArguments);
30-
}
31-
// Replace combined arguments placeholder.
32-
if (placeholderTarget === '*') {
33-
return quote([this.additionalArguments.join(' ')]);
20+
21+
if (this.additionalArguments.length > 0) {
22+
// Replace numeric placeholder if value exists in additional arguments.
23+
if (
24+
!isNaN(placeholderTarget) &&
25+
placeholderTarget <= this.additionalArguments.length
26+
) {
27+
return quote([this.additionalArguments[placeholderTarget - 1]]);
28+
}
29+
30+
// Replace all arguments placeholder.
31+
if (placeholderTarget === '@') {
32+
return quote(this.additionalArguments);
33+
}
34+
35+
// Replace combined arguments placeholder.
36+
if (placeholderTarget === '*') {
37+
return quote([this.additionalArguments.join(' ')]);
38+
}
3439
}
40+
3541
// Replace placeholder with empty string
3642
// if value doesn't exist in additional arguments.
3743
return '';

0 commit comments

Comments
 (0)