fix(packages/rebuild): fix generation check logic

This commit is contained in:
Mohammad Rafiq 2025-06-13 06:14:43 +08:00
parent 42b3a92d9b
commit 66bc9f679d
No known key found for this signature in database

View file

@ -91,8 +91,6 @@ pkgs.writeShellScriptBin "rebuild" # sh
nh os switch . || {
exit 1
}
fi
if ! "$NO_GENERATION_CHECK"; then
NEW_GENERATION=$(readlink /nix/var/nix/profiles/system | cut -d- -f2)
echo "New generation is $NEW_GENERATION. Current is $CURRENT_GENERATION."
@ -101,6 +99,7 @@ pkgs.writeShellScriptBin "rebuild" # sh
exit 1
fi
fi
fi
if ! "$QUICK"; then
prompt "Commit changes" commit