patch: refactor permission code

This commit is contained in:
Edwin Joassart 2025-07-16 11:49:20 +02:00
parent 4c2489d00f
commit a792c854ba
No known key found for this signature in database
GPG Key ID: 6337EBE5AC716051

View File

@ -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';