mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-20 16:15:43 +02:00
docs: ensure path is escaped when copying module docs
Without escaping the path here, filepaths for options named things like `*` will result in undefined behaviour.
This commit is contained in:
parent
6297f4c01a
commit
04c3247144
1 changed files with 4 additions and 1 deletions
|
@ -216,7 +216,10 @@ let
|
||||||
name: opts:
|
name: opts:
|
||||||
let
|
let
|
||||||
isBranch = if (lib.hasSuffix "index" opts.index.path) then true else opts.hasComponents;
|
isBranch = if (lib.hasSuffix "index" opts.index.path) then true else opts.hasComponents;
|
||||||
path = if isBranch then "${opts.index.path}/index.md" else "${opts.index.path}.md";
|
# Ensure `path` is escaped because we use it in a shell script
|
||||||
|
path = lib.strings.escapeShellArg (
|
||||||
|
if isBranch then "${opts.index.path}/index.md" else "${opts.index.path}.md"
|
||||||
|
);
|
||||||
in
|
in
|
||||||
(lib.optionalString isBranch "mkdir -p ${opts.index.path}\n")
|
(lib.optionalString isBranch "mkdir -p ${opts.index.path}\n")
|
||||||
+ (
|
+ (
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue