about summary refs log tree commit diff
path: root/nix/escapeExecline/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nix/escapeExecline/default.nix')
-rw-r--r--nix/escapeExecline/default.nix19
1 files changed, 11 insertions, 8 deletions
diff --git a/nix/escapeExecline/default.nix b/nix/escapeExecline/default.nix
index deef5c2c4e..d2c39dd398 100644
--- a/nix/escapeExecline/default.nix
+++ b/nix/escapeExecline/default.nix
@@ -16,14 +16,17 @@ let
   #   escapeExecline [ "if" [ "somecommand" ] "true" ]
   #   == ''"if" { "somecommand" } "true"''
   escapeExecline = execlineList: lib.concatStringsSep " "
-    (let
-      go = arg:
-        if      builtins.isString arg then [(escapeExeclineArg arg)]
-        else if builtins.isPath arg then [(escapeExeclineArg "${arg}")]
-        else if lib.isDerivation arg then [(escapeExeclineArg arg)]
-        else if builtins.isList arg then [ "{" ] ++ builtins.concatMap go arg ++ [ "}" ]
-        else abort "escapeExecline can only hande nested lists of strings, was ${lib.generators.toPretty {} arg}";
-     in builtins.concatMap go execlineList);
+    (
+      let
+        go = arg:
+          if builtins.isString arg then [ (escapeExeclineArg arg) ]
+          else if builtins.isPath arg then [ (escapeExeclineArg "${arg}") ]
+          else if lib.isDerivation arg then [ (escapeExeclineArg arg) ]
+          else if builtins.isList arg then [ "{" ] ++ builtins.concatMap go arg ++ [ "}" ]
+          else abort "escapeExecline can only hande nested lists of strings, was ${lib.generators.toPretty {} arg}";
+      in
+      builtins.concatMap go execlineList
+    );
 
 in
 escapeExecline