Skip to content

Commit

Permalink
chore: fix quote regexp (#1040)
Browse files Browse the repository at this point in the history
  • Loading branch information
antongolub authored Dec 25, 2024
1 parent f30a9d0 commit a4cc2a0
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 a4cc2a0

Please sign in to comment.