Skip to main content

Exit Codes

These exit codes are returned from a Buck2 command to the shell when the command exits.

These exit codes are Buck2's binary protocol for interacting with other software such as shell scripts.

Exit CodeExit StatusDescription
0SuccessThe command returned successfully.
1UnknownFailureCommand failed with an error that Buck2 was unable to identify
2InfraErrorError caused by the underlying infrastructure, such as Buck2 itself, the File System, etc.
3UserErrorError caused by user actions, such as wrong arguments, typos, etc.
4DaemonIsBusy--exit-when differentstate commands only. Daemon is connected and busy with another command
5DaemonPreempted--preemptible commands only. Buck2 daemon preempted the command as another came in.
6TimeoutCommand execution exceeded time limit
11ConnectErrorBuck2 client failed to connect to Buck2 daemon
32TestErrorBuck2 Test only. Build succeeded but at least 1 test failed
64TestNothingBuck2 Test only. Build succeeded but no test were ran (Either no tests defined or tests are skipped)
129-192SignalInterruptionThe code is computed as 128 + signal number. If Buck2 exited due to SIGINT(2) for example, the exit code would be 130