mirror of
https://cgit.krebsco.de/krops
synced 2024-11-26 21:19:47 +01:00
runShell: admit non-posix-compatible shells
This commit is contained in:
parent
625bd446dd
commit
6ee1d00b92
1 changed files with 4 additions and 1 deletions
|
@ -19,7 +19,10 @@ in
|
||||||
allocateTTY ? false
|
allocateTTY ? false
|
||||||
}: command:
|
}: command:
|
||||||
let
|
let
|
||||||
command' = if target.sudo then "sudo ${command}" else command;
|
command' = /* sh */ ''
|
||||||
|
${lib.optionalString target.sudo "sudo"} \
|
||||||
|
/bin/sh -c ${lib.escapeShellArg command}
|
||||||
|
'';
|
||||||
in
|
in
|
||||||
if lib.isLocalTarget target
|
if lib.isLocalTarget target
|
||||||
then command'
|
then command'
|
||||||
|
|
Loading…
Reference in a new issue