diff options
author | zimbatm <zimbatm@zimbatm.com> | 2016-06-19 23:27:52 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-06-19 23:27:52 +0100 |
commit | b0f8416c5c0e5345897832ae0cce139ed85c7fdb (patch) | |
tree | c34d9ef7febb4c1a6df6f179130506219e5e2d81 /pkgs/build-support/vm | |
parent | 53f421c0c4b4916426c369bfb996422209e6ebf7 (diff) | |
parent | 28fa4a2f03e2232d95dec9dc2b8ef40857d725db (diff) | |
download | nixpkgs-b0f8416c5c0e5345897832ae0cce139ed85c7fdb.tar nixpkgs-b0f8416c5c0e5345897832ae0cce139ed85c7fdb.tar.gz nixpkgs-b0f8416c5c0e5345897832ae0cce139ed85c7fdb.tar.bz2 nixpkgs-b0f8416c5c0e5345897832ae0cce139ed85c7fdb.tar.lz nixpkgs-b0f8416c5c0e5345897832ae0cce139ed85c7fdb.tar.xz nixpkgs-b0f8416c5c0e5345897832ae0cce139ed85c7fdb.tar.zst nixpkgs-b0f8416c5c0e5345897832ae0cce139ed85c7fdb.zip |
Merge pull request #16180 from zimbatm/shell-escaping
Escape all shell arguments uniformly
Diffstat (limited to 'pkgs/build-support/vm')
-rw-r--r-- | pkgs/build-support/vm/windows/controller/default.nix | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/pkgs/build-support/vm/windows/controller/default.nix b/pkgs/build-support/vm/windows/controller/default.nix index 1c8e6af83b8..06a0a229306 100644 --- a/pkgs/build-support/vm/windows/controller/default.nix +++ b/pkgs/build-support/vm/windows/controller/default.nix @@ -71,8 +71,6 @@ let }; }; - shellEscape = x: "'${replaceChars ["'"] [("'\\'" + "'")] x}'"; - loopForever = "while :; do ${coreutils}/bin/sleep 1; done"; initScript = writeScript "init.sh" ('' @@ -132,7 +130,7 @@ let -o StrictHostKeyChecking=no \ -i /ssh.key \ -l Administrator \ - 192.168.0.1 -- ${shellEscape command} + 192.168.0.1 -- ${lib.escapeShellArg command} '') + optionalString (suspendTo != null) '' ${coreutils}/bin/touch /xchg/suspend_now ${loopForever} |