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
1 changed files with 6 additions and 2 deletions

View File

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