From 1b87e0d1f90263f879affd5a2d51705f6eb043a4 Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Tue, 24 Dec 2024 01:22:11 +0100 Subject: 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. --- modules/by-name/ni/nix-sync/internal_module.nix | 4 ++-- 1 file 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"; -- cgit 1.4.1