diff --git a/backend/src/util.ts b/backend/src/util.ts index ba4e588..bffbce4 100644 --- a/backend/src/util.ts +++ b/backend/src/util.ts @@ -131,5 +131,10 @@ export function privilegedTeardown({ uid, uuid }: Context) { } export function bash(cmdline: string) { + if (!cmdline.match(/[;|&(){}=]/)) { + // Reduce number of subshells we generate, if we're just running a + // single command (no shell logic). + cmdline = "exec " + cmdline; + } return ["bash", "-c", cmdline]; }