about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJan Tojnar <jtojnar@gmail.com>2024-04-30 19:21:39 +0200
committerJan Tojnar <jtojnar@gmail.com>2024-05-02 23:19:15 +0200
commit499f72387374383d28673316749e5946d5a61c31 (patch)
treeaf7990c7c14dd819211037cb30c4a64653d6783a
parent29521b42cf644cd9713476c703507afa8d7ca187 (diff)
doc: Use substitute --replace-fail in manuals
This fixes a warning about --replace being deprecated.
-rw-r--r--doc/default.nix2
-rw-r--r--nixos/doc/manual/default.nix8
2 files changed, 5 insertions, 5 deletions
diff --git a/doc/default.nix b/doc/default.nix
index 76aba1a03eaf..ca4091dc222c 100644
--- a/doc/default.nix
+++ b/doc/default.nix
@@ -111,7 +111,7 @@ in pkgs.stdenv.mkDerivation {
       ${lib-docs}/index.md \
       > ./functions/library.md
     substitute ./manual.md.in ./manual.md \
-      --replace '@MANUAL_VERSION@' '${pkgs.lib.version}'
+      --replace-fail '@MANUAL_VERSION@' '${pkgs.lib.version}'
 
     mkdir -p out/media
 
diff --git a/nixos/doc/manual/default.nix b/nixos/doc/manual/default.nix
index 558fec4cab92..80916e9733c5 100644
--- a/nixos/doc/manual/default.nix
+++ b/nixos/doc/manual/default.nix
@@ -80,17 +80,17 @@ let
     cp -r --no-preserve=all $inputs/* .
 
     substituteInPlace ./manual.md \
-      --replace '@NIXOS_VERSION@' "${version}"
+      --replace-fail '@NIXOS_VERSION@' "${version}"
     substituteInPlace ./configuration/configuration.md \
-      --replace \
+      --replace-fail \
           '@MODULE_CHAPTERS@' \
           ${escapeShellArg (concatMapStringsSep "\n" (p: "${p.value}") config.meta.doc)}
     substituteInPlace ./nixos-options.md \
-      --replace \
+      --replace-fail \
         '@NIXOS_OPTIONS_JSON@' \
         ${optionsDoc.optionsJSON}/${common.outputPath}/options.json
     substituteInPlace ./development/writing-nixos-tests.section.md \
-      --replace \
+      --replace-fail \
         '@NIXOS_TEST_OPTIONS_JSON@' \
         ${testOptionsDoc.optionsJSON}/${common.outputPath}/options.json
     sed -e '/@PYTHON_MACHINE_METHODS@/ {' -e 'r ${testDriverMachineDocstrings}/machine-methods.md' -e 'd' -e '}' \