summary refs log tree commit diff stats
path: root/system/services/nix-sync/default.nix
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-06-02 21:47:53 +0200
committerSilas Schöffel <sils@sils.li>2024-06-05 18:45:48 +0200
commit4721eb7a3c13baddd2c8bf957f99b98d31dcf7b6 (patch)
tree7ba7625b3efd70a8bf555099a63a254d4964dc7e /system/services/nix-sync/default.nix
parentfix(nix-sync): Ensure that the `target` for `ln` never ends with a `/` (diff)
downloadnixos-server-4721eb7a3c13baddd2c8bf957f99b98d31dcf7b6.tar.gz
nixos-server-4721eb7a3c13baddd2c8bf957f99b98d31dcf7b6.zip
fix(nix-sync): Don't try to exit in a subshell
The `(cmd1 && cmd2)` pattern works, but fails with commands like `exit`
as the parentheses start a new subshell, which the `exit` command will
then close instead of exiting the main shell.
The curly brackets have the intended effect here, as they simply group
the commands together.
Diffstat (limited to '')
-rw-r--r--system/services/nix-sync/default.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/system/services/nix-sync/default.nix b/system/services/nix-sync/default.nix
index 8de5e3c..efa04a3 100644
--- a/system/services/nix-sync/default.nix
+++ b/system/services/nix-sync/default.nix
@@ -84,7 +84,7 @@
 
         out_paths=$(mktemp);
         nix build . --print-out-paths --experimental-features 'nix-command flakes' > "$out_paths";
-        [ "$(wc -l < "$out_paths")" -gt 1 ] && (echo "To many out-paths"; exit 1)
+        [ "$(wc -l < "$out_paths")" -gt 1 ] && { echo "To many out-paths"; exit 1; }
         out_path="$(cat "$out_paths")";
 
         if [ -d ${esa repo.path} ]; then