Skip to content

Commit a4cc2a0

Browse files
authored
chore: fix quote regexp (#1040)
1 parent f30a9d0 commit a4cc2a0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/util.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ export function preferLocalBin(
101101
// }
102102

103103
export function quote(arg: string): string {
104-
if (/^[\w/.-@:=]+$/.test(arg) || arg === '') {
104+
if (/^[\w/.\-@:=]+$/.test(arg) || arg === '') {
105105
return arg
106106
}
107107
return (
@@ -120,7 +120,7 @@ export function quote(arg: string): string {
120120
}
121121

122122
export function quotePowerShell(arg: string): string {
123-
if (/^[\w/.-]+$/.test(arg) || arg === '') {
123+
if (/^[\w/.\-]+$/.test(arg) || arg === '') {
124124
return arg
125125
}
126126
return `'` + arg.replace(/'/g, "''") + `'`

0 commit comments

Comments
 (0)