Escape all shell arguments uniformly

This commit is contained in:
zimbatm
2016-06-12 18:11:37 +01:00
parent 852e9c3096
commit 28fa4a2f03
9 changed files with 20 additions and 19 deletions

View File

@@ -37,7 +37,6 @@
# that point into the user's profile.
let
shellEscape = x: "'${lib.replaceChars ["'"] [("'\\'" + "'")] x}'";
installer = writeScript "xquartz-install" ''
NIX_LINK=$HOME/.nix-profile
@@ -138,7 +137,7 @@ in stdenv.mkDerivation {
defaultStartX="$out/bin/startx -- $out/bin/Xquartz"
ruby ${./patch_plist.rb} \
${shellEscape (builtins.toXML {
${lib.escapeShellArg (builtins.toXML {
XQUARTZ_DEFAULT_CLIENT = "${xterm}/bin/xterm";
XQUARTZ_DEFAULT_SHELL = "${shell}";
XQUARTZ_DEFAULT_STARTX = "@STARTX@";