diff --git a/scripts/functions b/scripts/functions index 86653465..91ec2171 100644 --- a/scripts/functions +++ b/scripts/functions @@ -14,7 +14,7 @@ CT_OnError() { # To avoid printing the backtace for each sub-shell # up to the top-level, just remember we've dumped it if [ ! -f "${CT_WORK_DIR}/backtrace" ]; then - touch "${CT_WORK_DIR}/backtrace" + [ -d "${CT_WORK_DIR}" ] && touch "${CT_WORK_DIR}/backtrace" # Print steps backtrace step_depth=${CT_STEP_COUNT}