Skip to content

Commit

Permalink
mac: debug log the actual defaults write actual command run
Browse files Browse the repository at this point in the history
Otherwise with the function indirection it's a little painful to work
out the command being run.
  • Loading branch information
gibfahn committed Feb 3, 2020
1 parent adeb1a9 commit 37aa749
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions helpers/setup.sh
Expand Up @@ -231,6 +231,7 @@ updateMacOSKeyboardShortcut() {
updateMacOSDefaultDict "$1" NSUserKeyEquivalents "$2" "$3"
if ! defaults read com.apple.universalaccess com.apple.custommenu.apps | grep -qF "$1"; then
log_update "macOS default shortcut $1 is not in com.apple.universalaccess com.apple.custommenu.apps, adding it."
log_debug "defaults write com.apple.universalaccess com.apple.custommenu.apps -array-add \"$1\""
defaults write com.apple.universalaccess com.apple.custommenu.apps -array-add "$1" \
|| echo "Add the current Terminal app to System Preferences -> Privacy -> Full Disk Access."
fi
Expand Down Expand Up @@ -261,5 +262,6 @@ updateMacOSDefault() {
log_update "macOS default $domain $key is unset, setting it to $val"
fi

log_debug "defaults write \"$domain\" \"$key\" \"$val_type\" \"$val\""
defaults write "$domain" "$key" "$val_type" "$val"
}

0 comments on commit 37aa749

Please sign in to comment.