Skip to content

Exit codes of tt commands

tt help errors prints this text.

Exit codes of tt commands.

0  Success.
1  The request cannot be carried out as given, and the fix is on the caller's
   side: the manifest does not parse or is invalid, the lock is out of date
   under --locked, a dependency does not resolve, a package collides with one
   already installed, a registry URL is malformed, a path does not exist.
2  The system the command ran on failed: a component build backend failed, a
   server could not be reached or did not answer in time, a host name did not
   resolve, the filesystem refused an operation for want of permission or space.
3  A multi-target operation partly succeeded: some of its targets went through
   and some did not, such as some of the packages of an install or some of the
   instances of a stop.

Which failure within a code it was is carried by the error message, not by a further number.

Backup and restore commands also return command-specific verdict codes, documented in each command's --help. These start at 3, keeping invalid requests (1) and system failures (2) separate from backup and recovery verdicts.

A command provided by an external module exits with the module's own code. Once tt test has started luatest, its exit code is luatest's own. tt run replaces itself with Tarantool, so its exit code is Tarantool's. tt instance start --foreground exits once its instances have ended: with 0 when they were stopped in time, with the exit code of the first instance that ended on its own with another code, with 137 when an instance did not stop in time and was killed.