about summary refs log tree commit diff stats
path: root/common
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-10-04 17:54:28 +0200
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-10-04 17:54:28 +0200
commit9270236d5bacafe6d8247ef13a34a0d03c05f636 (patch)
tree5bdca82923b15cb85057401e1e514cb2ba63d0c7 /common
parentrefactor(common/init): Rewrite the `quotify` function in python (diff)
downloadflake-templates-9270236d5bacafe6d8247ef13a34a0d03c05f636.tar.gz
flake-templates-9270236d5bacafe6d8247ef13a34a0d03c05f636.zip
fix(common/init): Check for not replaced `%INIT_` variables
Diffstat (limited to 'common')
-rw-r--r--common/init5
1 files changed, 5 insertions, 0 deletions
diff --git a/common/init b/common/init
index 4298e68..b645441 100644
--- a/common/init
+++ b/common/init
@@ -181,6 +181,11 @@ while read -r var; do
     done
 done <"$replacement_file"
 
+if [ "$(rg "%INIT_" --files-with-matches | wc -l)" -ne 0 ]; then
+    echo "Following init variables were not replaced. This is a bug."
+    rg "%INIT_"
+fi
+
 # HACK: Re-add the executable permissions to files, which the nix template has somehow
 # removed <2024-04-02>
 chmod +x scripts/*