Exit codes
tn-venv uses a small, stable set of process exit codes so automation can
react without parsing output.
Code |
Meaning |
Typical causes |
|---|---|---|
|
success |
environment created; |
|
execution failure ( |
destination already contains an environment; interpreter not found; ensurepip/pip failed; lock timed out; requirements file missing |
|
usage / configuration error |
unknown flag; invalid choice; |
|
interrupted |
Ctrl+C during creation |
Rules of thumb for scripts:
2means fix the invocation — retrying unchanged will fail again.1means fix the environment — the lock, the network, or the destination state.The error class is always printed as part of the message, and
-vvshows the failing subprocess command and its full output.
cli_run() (see Python API reference) returns exactly these codes, so
embedding code can rely on the same contract.