From 0c13cebcf837beef12733f1ff5b2a2c7bc0f188c Mon Sep 17 00:00:00 2001 From: Profpatsch Date: Mon, 30 Nov 2020 22:52:16 +0100 Subject: [PATCH] chore(test.sh): drop result link with trap --- test.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/test.sh b/test.sh index 6243540..c081b68 100755 --- a/test.sh +++ b/test.sh @@ -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"