Checking last process exit code

Sep 7, 2015

When setting up your tools for Continuous Integration one of the things that you will have to do is making sure you’re exiting with the correct code.

An easy way to check the exit code of last process run in Terminal is simply to execute this command:

    echo $?

While in most cases the exit code will be 0 (indicating successful execution of the process) this can be extremely useful for troubleshooting and ensuring your CI tool catches the errors correctly.