Fix nix wrapper not handling exit codes properly

Signed-off-by: magic_rb <magic_rb@redalder.org>
This commit is contained in:
magic_rb 2023-12-03 20:00:25 +01:00
parent ad6a5f6784
commit e7abad7a14
No known key found for this signature in database
GPG key ID: 08D5287CC5DDCA0E

View file

@ -262,7 +262,6 @@
immutable=0
for arg in "$@" ; do
echo "$arg"
if [[ "$arg" =~ ^git\+file://.*$ ]] ; then
immutable=1
fi
@ -308,6 +307,7 @@
done
( exec -a $0 .nix-unwrapped "''${new_args[@]}" )
ret_code=$?
post_lock_hash="$(sha256sum flake-secret.lock | cut -f1 -d' ')"
@ -315,6 +315,7 @@
cp flake-secret.lock flake.lock
.nix-unwrapped flake lock --override-input secret path:///var/empty
fi
exit $ret_code
'';
nix-with-wrapper = pkgs.symlinkJoin {
name = "nix";