fix: use quotes for path creation

This commit is contained in:
dusk 2021-05-17 18:07:02 +03:00
parent 36452d3a31
commit caf60bb107
Signed by: dusk
GPG Key ID: 1D8F8FAF2294D6EA

View File

@ -15,7 +15,7 @@ let
fileAttrPaths = recursiveAttrPaths site;
texts = mapAttrsRecursive (path: value: pkgs.writeText (concatStringsSep "-" path) value) site;
mkCreateFileCmd = path: value: let p = concatStringsSep "/" (init path); in "mkdir -p $out/${p} && ln -s ${value} $out/${p}/${last path}";
mkCreateFileCmd = path: value: let p = concatStringsSep "/" (init path); in "mkdir -p \"$out/${p}\" && ln -s \"${value}\" \"$out/${p}/${last path}\"";
createFileCmds = map (path: mkCreateFileCmd path (getAttrFromPath path texts)) fileAttrPaths;
in
pkgs.runCommand "site-path" { } ''