readthedocs.org
readthedocs.org copied to clipboard
doc: Document `build.commands` working directory
I just got bit by this trying to do
build:
commands:
- cd docs
- myst build --html
After the cd docs, the next command is reset to the main repo root
:books: Documentation previews :books:
- User's documentation (
docs): https://docs--11218.org.readthedocs.build/en/11218/
- Developer's documentation (
dev): https://dev--11218.org.readthedocs.build/en/11218/
Thanks for the note! I agree this is not clear in our docs, so happy to have this clarified.
What is happening here is that each command is run in it's own shell instance. So cd docs alone as a command doesn't affect the working directory of following commands, but also commands like PYTHONPATH=./something also does not affect following commands.
We see confusion around all of the different ways you can trigger this behavior, maybe the note should mention commands running in individual shells instead.
We see confusion around all of the different ways you can trigger this behavior, maybe the note should mention commands running in individual shells instead.
Agreed. Feel free to take-over and change the wording. I didn't setup my environment for this repo yet.
(Managed to do it with codespace and browser. And now I remember why I gave up on VSCode early on)