nixos/mandoc: Leave shell argument quoting to nix

Manually crafting a quoted string that otherwise lacks any safe-guards
looks odd.

Use `escapeShellArg` instead before prepending the path.
This commit is contained in:
Klemens Nanni 2022-05-08 15:32:17 +02:00 committed by sternenseemann
parent e6fb1e63d1
commit 199933efdf

View file

@ -53,7 +53,9 @@ in {
# see: https://inbox.vuxu.org/mandoc-tech/20210906171231.GF83680@athene.usta.de/T/#e85f773c1781e3fef85562b2794f9cad7b2909a3c
extraSetup = lib.mkIf config.documentation.man.generateCaches ''
${makewhatis} -T utf8 ${
lib.concatMapStringsSep " " (path: "\"$out/${path}\"") cfg.manPath
lib.concatMapStringsSep " " (path:
"$out/" + lib.escapeShellArg path
) cfg.manPath
}
'';
};