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

Use python to expand the cwd instead of environment variables #4882

Merged
merged 5 commits into from Nov 8, 2018

Conversation

@ericholscher
Copy link
Member

@ericholscher ericholscher commented Nov 8, 2018

No description provided.

@@ -218,7 +218,7 @@ def setup_base(self):
# Don't use virtualenv bin that doesn't exist yet
bin_path=None,
# Don't use the project's root, some config files can interfere
cwd='$HOME',
cwd=os.path.expanduser("~"),
Copy link
Member

@stsewd stsewd Nov 8, 2018

I believe this will pass to the docker container the home from outside rather than the one inside docker

Copy link
Member Author

@ericholscher ericholscher Nov 8, 2018

I wonder if we should just do /, since it doesn't matter what the cwd is, but we just don't want it to be the users directory?

Copy link
Member

@stsewd stsewd Nov 8, 2018

That probably will raise some permission issues #4808 (comment)

I think we just need to edit the LocalBuilder class to allow shell expansions in cwd

Copy link
Member Author

@ericholscher ericholscher Nov 8, 2018

Good call, updated.

Copy link
Member Author

@ericholscher ericholscher Nov 8, 2018

Hrm, this still will break on docker though, eh?

Copy link
Member

@stsewd stsewd Nov 8, 2018

If we do the expansion inside the run method it shouldn't, docker overrides all the run command I think

@codecov
Copy link

@codecov codecov bot commented Nov 8, 2018

Codecov Report

Merging #4882 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #4882   +/-   ##
=======================================
  Coverage   76.64%   76.64%           
=======================================
  Files         158      158           
  Lines       10054    10054           
  Branches     1271     1271           
=======================================
  Hits         7706     7706           
  Misses       2007     2007           
  Partials      341      341
Impacted Files Coverage Δ
readthedocs/doc_builder/environments.py 87.33% <ø> (ø) ⬆️

Copy link
Contributor

@davidfischer davidfischer left a comment

This did fix the issue in my testing.

stsewd
stsewd approved these changes Nov 8, 2018
Copy link
Member

@stsewd stsewd left a comment

Tested this, it doesn't break docker

@ericholscher ericholscher merged commit 3930383 into master Nov 8, 2018
3 checks passed
@stsewd stsewd deleted the fix-path-extension branch Nov 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants