Skip to content

Commit

Permalink
chore: fix quote regexp
Browse files Browse the repository at this point in the history
  • Loading branch information
antongolub committed Dec 25, 2024
1 parent f30a9d0 commit 2e1293e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ export function preferLocalBin(
// }

export function quote(arg: string): string {
if (/^[\w/.-@:=]+$/.test(arg) || arg === '') {
if (/^[\w/.\-@:=]+$/.test(arg) || arg === '') {
return arg
}
return (
Expand All @@ -120,7 +120,7 @@ export function quote(arg: string): string {
}

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

0 comments on commit 2e1293e

Please sign in to comment.