Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detect when the current directory doesn't exist #352

Open
asmeurer opened this issue Sep 16, 2019 · 1 comment
Open

Detect when the current directory doesn't exist #352

asmeurer opened this issue Sep 16, 2019 · 1 comment

Comments

@asmeurer
Copy link
Member

If someone does something like

cd doc
make html
doctr deploy .

then doctr will fail, because doc doesn't exist in the gh-pages branch. This may only occur when gh-pages is being created (specifically when creating, .nojekyll).

@asmeurer
Copy link
Member Author

asmeurer commented Mar 4, 2020

For reference, if you get an error like

touch .nojekyll
touch: cannot touch '.nojekyll': No such file or directory
git checkout b946b0405f0fd222c5a6a07d7fff468673552dc8
fatal: Unable to read current working directory: No such file or directory
The website and docs are not pushed to gh-pages on pull requests
ERROR: The doctr command '/home/travis/virtualenv/python3.7.1/bin/doctr deploy .' failed: SystemExit('\x1b[31mtouch .nojekyll failed: 1\x1b[0m')

This is the cause. The fix is to add cd .. to cd back to the top-level git directory before calling doctr.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant