Stop SSHFS hanging, and name the real reason Gatekeeper refuses an app
With macFUSE's FSKit extension off, sshfs waits forever and ignores TERM; sftp_mount gives it 30 seconds, then stops it and says to turn macFUSE on. On a Mac that allows only App Store apps, app_install said the download "isn't notarized"; it now says the Mac only allows App Store apps, and where to change that. The vanilla image is like that and since macOS 15 only System Settings or MDM can change it, so 70-apps checks the message and skips the installs there. 85-sftp checks that add_sftp gives up while the extension is off. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
f2e6908dfd
commit
eab26c0888
+20
-2
@@ -97,12 +97,30 @@ verify_team() {
|
||||
fi
|
||||
}
|
||||
|
||||
# Whether Gatekeeper allows apps from identified developers, and not only
|
||||
# the App Store (System Settings > Privacy & Security)
|
||||
developer_id_allowed() {
|
||||
! spctl --status -v 2> /dev/null | grep -q 'developer id disabled'
|
||||
}
|
||||
|
||||
# Why Gatekeeper turned something down: this Mac only allows App Store apps,
|
||||
# or it isn't notarized
|
||||
gatekeeper_refused() {
|
||||
if ! developer_id_allowed; then
|
||||
echo "${RED}Gatekeeper doesn't accept $1: this Mac only allows apps from the App Store.$RESET"
|
||||
echo "In System Settings > Privacy & Security, allow applications from the App Store"
|
||||
echo "and identified developers, then try again."
|
||||
else
|
||||
echo "${RED}Gatekeeper doesn't accept $1 (it isn't notarized). Not installing it.$RESET"
|
||||
fi
|
||||
}
|
||||
|
||||
# Install a downloaded .pkg, once it's checked. The installer needs admin.
|
||||
install_pkg() {
|
||||
local pkg="$1"
|
||||
verify_team "The download" "$(pkg_team "$pkg")" || return 1
|
||||
if ! spctl --assess --type install "$pkg" 2> /dev/null; then
|
||||
echo "${RED}Gatekeeper doesn't accept the download (it isn't notarized). Not installing it.$RESET"
|
||||
gatekeeper_refused "the download"
|
||||
return 1
|
||||
fi
|
||||
echo "Installing $APP_TITLE needs your Mac password."
|
||||
@@ -123,7 +141,7 @@ install_dmg() {
|
||||
elif ! verify_team "$APP_BUNDLE" "$(app_team "$app")"; then
|
||||
status=1
|
||||
elif ! spctl --assess --type execute "$app" 2> /dev/null; then
|
||||
echo "${RED}Gatekeeper doesn't accept $APP_BUNDLE (it isn't notarized). Not installing it.$RESET"
|
||||
gatekeeper_refused "$APP_BUNDLE"
|
||||
status=1
|
||||
elif ! ditto "$app" "/Applications/$APP_BUNDLE" 2> /dev/null; then
|
||||
echo "Copying $APP_TITLE to Applications needs your Mac password."
|
||||
|
||||
Reference in New Issue
Block a user