summary refs log tree commit diff stats
path: root/modules/by-name
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-12-24 01:22:11 +0100
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-12-24 01:22:11 +0100
commit1b87e0d1f90263f879affd5a2d51705f6eb043a4 (patch)
treeede5c90b62d4943dacaa2b2bd4ba2fd1698eb99e /modules/by-name
parentbuild(pkgs/back): Apply source filtering (diff)
downloadnixos-server-1b87e0d1f90263f879affd5a2d51705f6eb043a4.tar.gz
nixos-server-1b87e0d1f90263f879affd5a2d51705f6eb043a4.zip
fix(modules/nix-sync/internal): Use correct command grouping syntax
Commands in parentheses (i.e., `()`) are _subshells_ and `exit`ting from
these will not result in an `exit` of the actually _shell_. Thus, we use
want simple command grouping and use the correct syntax for that.
Diffstat (limited to '')
-rw-r--r--modules/by-name/ni/nix-sync/internal_module.nix4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/by-name/ni/nix-sync/internal_module.nix b/modules/by-name/ni/nix-sync/internal_module.nix
index a3ab0af..e3b55c9 100644
--- a/modules/by-name/ni/nix-sync/internal_module.nix
+++ b/modules/by-name/ni/nix-sync/internal_module.nix
@@ -55,7 +55,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")";
         rm ${esa repoPath};
         ln -s "$out_path" ${esa repoPath};
@@ -71,7 +71,7 @@
 
           out_paths=$(mktemp);
           nix build ${esa repoCachePath} --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")";
           ln -s "$out_path" ${esa repoPath};
           rm "$out_paths";