feat: run script tests in temp dirs for slightly better sandboxing

This commit is contained in:
technofab 2025-09-02 13:22:28 +02:00
parent c9298b91f4
commit 5741109cc9
No known key found for this signature in database
3 changed files with 15 additions and 16 deletions

View file

@ -35,16 +35,6 @@ function assert_file_not_contains() {
}
}
function tmpdir() {
dir=$(mktemp -d)
trap "rm -rf $dir" EXIT
echo -n "$dir"
}
function tmpfile() {
file=$(mktemp)
trap "rm -f $file" EXIT
echo -n "$file"
}
function run() {
output=$($@ 2>&1)
exit_code=$?