Skip to content

Commit ada449b

Browse files
committed
chore(test): make project_open test mktemp portable to BSD
1 parent 9c8b2ae commit ada449b

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

tests/project_open_test.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,10 @@ assert_eq() {
1818

1919
ROOT=""
2020
setup_fixture() {
21-
ROOT="$(mktemp -d)"
21+
# Templates keep mktemp portable: BSD/macOS mktemp needs one, GNU accepts it.
22+
ROOT="$(mktemp -d "${TMPDIR:-/tmp}/project_open_root.XXXXXX")"
2223
export PROJECT_OPEN_ROOT="${ROOT}"
23-
XDG_CACHE_HOME="$(mktemp -d)"
24+
XDG_CACHE_HOME="$(mktemp -d "${TMPDIR:-/tmp}/project_open_cache.XXXXXX")"
2425
export XDG_CACHE_HOME
2526
mkdir -p \
2627
"${ROOT}/mods/HoldFast/.git" \

0 commit comments

Comments
 (0)