Free fork of NotProton: Windows Steam games in Mac Steam, on CodeWeavers' Wine and Apple's Game Porting Toolkit
Swift apple-silicond3dmetaldxmtdxvkgame-porting-toolkitgptkmac-gamingmacosmetalfxrosetta-2steamsteam-playwinewinecx
test: keep cleanup traps off the current folder when mktemp fails
raymondchins71958c599ad2
diff --git a/dylib/tests/gamedrivecheck.sh b/dylib/tests/gamedrivecheck.shindex e72b94b..42a1c43 100644--- a/dylib/tests/gamedrivecheck.sh+++ b/dylib/tests/gamedrivecheck.sh@@ -9,7 +9,8 @@ body=$(sed -n '/^game_drive_record() {/,/^}/p;/^record_game_drive() {/,/^}/p;/^rbody='without_lock_fds() { printf "%s\n" "${1##*/} $2" >> "$restarts"; }'"$body"-work=$(cd "$(mktemp -d)" && pwd -P)+# a failed mktemp must not leave work at the current folder, which the trap deletes+work=$(mktemp -d) && work=$(cd "$work" && pwd -P) || exit 1trap 'rm -rf "$work"' EXITfails=0diff --git a/scripts/tests/cicheck.sh b/scripts/tests/cicheck.shindex 7271790..b3fa005 100644--- a/scripts/tests/cicheck.sh+++ b/scripts/tests/cicheck.sh@@ -9,7 +9,7 @@# shellcheck disable=SC2016 # the workflow lines checked below contain literal ${{ }} and $VARset -uroot=$(cd "$(dirname "$0")/../.." && pwd)-work=$(mktemp -d)+work=$(mktemp -d) || exit 1trap 'rm -rf "$work"' EXITpassed=0