Skip to content

Instantly share code, notes, and snippets.

@habovh
Last active February 6, 2024 07:51
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save habovh/5bb425b431dded44e8b666561aead17d to your computer and use it in GitHub Desktop.
Save habovh/5bb425b431dded44e8b666561aead17d to your computer and use it in GitHub Desktop.
Simple bash script to quickly enable/disable macOS crash reporting dialogs. Tested on macOS Sierra.
#!/bin/bash
# Author: Jordan Becker (https://becker.io/)
if [ $# -lt 1 ]; then
echo "Usage: $0 (on|off|read)"
echo "Lets you quickly enable or disable macOS crash reporting dialogs. Useful for betas ;)"
exit 1
fi
case "$1" in
"on")
defaults write com.apple.CrashReporter DialogType crashreport
echo "Successfully enabled macOS crash reporting dialogs."
exit 0
;;
"off")
defaults write com.apple.CrashReporter DialogType none
echo "Successfully disabled macOS crash reporting dialogs."
exit 0
;;
"read")
echo "Current dialog type: $(defaults read com.apple.CrashReporter DialogType)"
exit 0
;;
*)
echo "Unrecognized parameter '$1'."
echo "Usage: $0 (on|off|read)"
echo "Current dialog type: $(defaults read com.apple.CrashReporter DialogType)"
exit 0
;;
esac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment