Unclear execution order of readthedocs.yml build commands
0 reputation · 14 Oct 2022, 03:39 UTC
Background
The readthedocs.yml file’s build.commands list can contain multiple shell instructions. A local build that runs these commands in the order written often succeeds, yet the same project may fail on Read the Docs with a generic Command exited with non‑zero status error when more than one command is listed.
Ambiguity
The official documentation does not specify whether the commands are run sequentially or concurrently. This omission can lead to race conditions, especially when later commands depend on artifacts produced by earlier ones, or when the READTHEDOCS environment variable is present only in the RTD environment.
Unresolved Questions
- Are the
commandsin thebuildsection executed one after another or launched in parallel on Read the Docs? - Does the presence of the
READTHEDOCSenvironment variable affect the ordering or isolation of these commands? - How does the
environmentkey, which installs system packages, interact with the timing of command execution?