From 199933efdf5945792f149253256e983f0643cddb Mon Sep 17 00:00:00 2001 From: Klemens Nanni Date: Sun, 8 May 2022 15:32:17 +0200 Subject: [PATCH] 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. --- nixos/modules/misc/mandoc.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nixos/modules/misc/mandoc.nix b/nixos/modules/misc/mandoc.nix index 3da60f2f8e6..838f2087656 100644 --- a/nixos/modules/misc/mandoc.nix +++ b/nixos/modules/misc/mandoc.nix @@ -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 } ''; };