aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2022-09-07 11:17:39 +0200
committertv <tv@krebsco.de>2022-09-07 11:17:39 +0200
commit6ee1d00b924e6187c7ee0f70b5a7d62be43b5853 (patch)
tree6e0ee96291d587d756be5e6d404d5172d50aa4a1
parent625bd446dd7238c5226dc90c89bdfa4ee5c13688 (diff)
runShell: admit non-posix-compatible shells
-rw-r--r--pkgs/krops/default.nix5
1 files changed, 4 insertions, 1 deletions
diff --git a/pkgs/krops/default.nix b/pkgs/krops/default.nix
index 429e648..b94c89b 100644
--- a/pkgs/krops/default.nix
+++ b/pkgs/krops/default.nix
@@ -19,7 +19,10 @@ in
allocateTTY ? false
}: command:
let
- command' = if target.sudo then "sudo ${command}" else command;
+ command' = /* sh */ ''
+ ${lib.optionalString target.sudo "sudo"} \
+ /bin/sh -c ${lib.escapeShellArg command}
+ '';
in
if lib.isLocalTarget target
then command'