command-line-reference.md
This file
Path
docs/command-line-reference.md
50 lines · 1.2 KiB · Markdown
Last changed by
Document help page exit codes (#3122)Rowlando13before adoption7b4e59c
History of this fileTake it
Very short description of exit codes and how to access them (#3112)Rowlando13before adoption868b611
lines 1–12why, one step back1# General Command Line Topics23```{currentmodule} click4```56```{contents}7---8depth: 19local: true10---11```12Document help page exit codes (#3122)Rowlando13before adoption7b4e59c
line 13why, one step back13(exit-codes)=Very short description of exit codes and how to access them (#3112)Rowlando13before adoption868b611
lines 14–48why, one step back14## Exit Codes1516When a command is executed from the command line, then an exit code is return. The exit code, also called exit status or exit status code, is a positive integer that tells you whether the command executed with or without errors.1718| Exit Code | Meaning |19|-----------|-------------------------------------------------|20| 0 | Success — the command completed without errors. |21| > 0 | Executed with errors |2223Exit codes greater than zero mean are specific to the Operating System, Shell, and/or command.2425To access the exit code, execute the command, then do the following depending:2627```{eval-rst}28.. tabs::2930 .. group-tab:: Powershell3132 .. code-block:: powershell3334 > echo $LASTEXITCODE3536 .. group-tab:: Bash3738 .. code-block:: bash3940 $ echo $?4142 .. group-tab:: Command Prompt434445 .. code-block:: text4647 > echo %ERRORLEVEL%48```Document help page exit codes (#3122)Rowlando13before adoption7b4e59c
lines 49–50why, one step back4950For Click specific behavior on exit codes, see {ref}`exception-handling-exit-codes`.