From 27aa86b279752ae44a94219d3dcbceeb6a28219c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Theilgaard?= Date: Thu, 7 Apr 2022 20:06:17 +0200 Subject: [PATCH] Extra log for spctl rejected --- fragments/functions.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/fragments/functions.sh b/fragments/functions.sh index 8dbccb3..55c17db 100644 --- a/fragments/functions.sh +++ b/fragments/functions.sh @@ -425,6 +425,9 @@ installAppWithPath() { # $1: path to app to install in $targetDir if [[ $appVerifyStatus -ne 0 ]] ; then #if ! teamID=$(spctl -a -vv "$appPath" 2>&1 | awk '/origin=/ {print $NF }' | tr -d '()' ); then + if [[ "$(echo $appVerify | head -1 | grep -oi rejected)" = "rejected" ]]; then + printlog "Gatekeeper check rejected. Could be that gatekeeper settings only accept App Store apps." ERROR + fi cleanupAndExit 4 "Error verifying $appPath error:\n$logoutput" ERROR fi printlog "Debugging enabled, App Verification output was:\n$logoutput" DEBUG @@ -578,6 +581,9 @@ installFromPKG() { if [[ $spctlStatus -ne 0 ]] ; then #if ! spctlout=$(spctl -a -vv -t install "$archiveName" 2>&1 ); then + if [[ "$(echo $spctlOut | head -1 | grep -oi rejected)" = "rejected" ]]; then + printlog "Gatekeeper check rejected. Could be that gatekeeper settings only accept App Store apps." ERROR + fi cleanupAndExit 4 "Error verifying $archiveName error:\n$logoutput" ERROR fi