Skip to content

Instantly share code, notes, and snippets.

@kastiglione
Last active May 6, 2021 00:47
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kastiglione/76f337d0e640397d41f0be5419930150 to your computer and use it in GitHub Desktop.
Save kastiglione/76f337d0e640397d41f0be5419930150 to your computer and use it in GitHub Desktop.
Help identify a raw error code
wut() {
readonly error_code=$1
local domain
for domain in posix mach; do
tput bold; echo $domain; tput sgr0
launchctl error $domain $error_code
done
tput bold; echo security; tput sgr0
security error $error_code
}
@kastiglione
Copy link
Author

Example:

% wut 50
posix
50: Network is down
mach
0x32: (os/kern) code signing error
system = 0x0
subsystem = 0x0
code = 0x32

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment