mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 08:35:43 +02:00
docs: fix moduleDoc being interpreted by bash
Including the `moduleDoc` text directly in the `copy_docs` script meant special chars were interpreted by bash. Write the text to the nix store so we can `cat` a file instead.
This commit is contained in:
parent
fd5ef72725
commit
d45c30f160
1 changed files with 9 additions and 8 deletions
|
@ -202,11 +202,12 @@ with lib; let
|
||||||
+ (
|
+ (
|
||||||
if opts.index.moduleDoc == null
|
if opts.index.moduleDoc == null
|
||||||
then "cp ${mkMDDoc opts.index.options} ${path}"
|
then "cp ${mkMDDoc opts.index.options} ${path}"
|
||||||
else ''
|
else
|
||||||
|
# Including moduleDoc's text directly will result in bash interpreting special chars,
|
||||||
|
# write it to the nix store and `cat` the file instead.
|
||||||
|
''
|
||||||
{
|
{
|
||||||
cat <<EOF
|
cat ${pkgs.writeText "module-doc" opts.index.moduleDoc}
|
||||||
${opts.index.moduleDoc}
|
|
||||||
EOF
|
|
||||||
cat ${mkMDDoc opts.index.options}
|
cat ${mkMDDoc opts.index.options}
|
||||||
} > ${path}
|
} > ${path}
|
||||||
''
|
''
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue