From 2e1293ec0c437e377d43286b81203a39c377555b Mon Sep 17 00:00:00 2001 From: Anton Golub Date: Wed, 25 Dec 2024 22:57:54 +0300 Subject: [PATCH] chore: fix quote regexp --- src/util.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util.ts b/src/util.ts index 1c42eaf4d5..ca5cb47b51 100644 --- a/src/util.ts +++ b/src/util.ts @@ -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 ( @@ -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, "''") + `'`