chore(test.sh): drop result link with trap

This commit is contained in:
Profpatsch 2020-11-30 22:52:16 +01:00
parent 805358c8ec
commit 0c13cebcf8

View file

@ -1,4 +1,8 @@
#!/usr/bin/env sh #!/usr/bin/env sh
set -e set -e
test_script="$(nix-build ./test.nix)" tmp="$(mktemp -d)"
exec "$test_script" trap "rm -r $tmp" EXIT
nix-build \
--out-link "$tmp"/result \
./test.nix
"$tmp/result"