1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-04 15:39:43 +00:00

ensure workdir is set on tests

This commit is contained in:
deadc0de6
2022-12-07 15:46:46 +01:00
committed by deadc0de
parent 593d8d9a61
commit 44b3c03412

9
tests-ng/helpers vendored
View File

@@ -101,3 +101,12 @@ if [[ $OSTYPE == 'darwin'* ]]; then
export -f readlink
export -f realpath
fi
# workdir tricks
# when tests are called without using the
# top level tests.sh script which sets the workdir
if [ -z "${DOTDROP_WORKDIR}" ]; then
_workdir="/tmp/dotdrop-test-workdir"
export DOTDROP_WORKDIR="${_workdir}"
clear_on_exit "${_workdir}"
fi