From ce250129739a4ada387e8bfba93c9db22f0077f9 Mon Sep 17 00:00:00 2001 From: Stephen Boyle Date: Mon, 17 May 2021 16:20:21 -0400 Subject: [PATCH] Dont download pkg if we are set to silent_fail and there is blocking process Fixes issue where installomator will repeatedly download the pkg each run when set to silent_fail and a blockingprocess is present. --- Installomator.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Installomator.sh b/Installomator.sh index 3a03c8e..168116e 100755 --- a/Installomator.sh +++ b/Installomator.sh @@ -3228,6 +3228,15 @@ fi if [ -f "$archiveName" ] && [ "$DEBUG" -ne 0 ]; then printlog "$archiveName exists and DEBUG enabled, skipping download" else + # check for blocking process and exit if we are instructed to silent_fail (prevents excess download) + if [[ $BLOCKING_PROCESS_ACTION == "silent_fail" ]]; then + if [[ ${#blockingProcesses} -gt 0 ]]; then + if [[ ${blockingProcesses[1]} != "NONE" ]]; then + checkRunningProcesses + fi + fi + fi + # download the dmg printlog "Downloading $downloadURL to $archiveName" if [[ $currentUser != "loginwindow" && $NOTIFY == "all" ]]; then