diff --git a/lib/shared/sudo/darwin.ts b/lib/shared/sudo/darwin.ts index 5eb0993c..5f05dae0 100644 --- a/lib/shared/sudo/darwin.ts +++ b/lib/shared/sudo/darwin.ts @@ -43,7 +43,7 @@ export async function sudo( // Build the shell command string const shellCmd = `echo ${SUCCESSFUL_AUTH_MARKER} && ${command[0]} ${command .slice(1) - .map((a) => a.replace(/"/g, '"')) + .map((a) => a.replace(/"/g, '\\"')) .join(' ')}`; let elevated = 'pending';