-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Add cwd to subprocess calls #4611
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
Conversation
We were assuming this path before, which defaulted to the path you executed django from on the host machine. The cwd was used in commands run on inside Docker however. On Linux dev environments, this path is most likely missing. By specifying paths, we will get paths that have been created inside the container.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't follow what this fixes. What's the error that you were getting without applying these changes?
I've never experienced this before in my local environment.
My instance is broken between all my patches, but the error something like this in the virtualenv step:
It's because the application uses the cwd of the application, which does not exist in the docker container. Instead of just using the default cwd for these commands, we specify one so that the host system cwd isn't used. Not sure why you wouldn't have hit this, unless you added extra paths into docker or change a setting i didn't change. |
I didn't change any setting related to this. Maybe this is still a permission issue and since I'm creating my Docker image in a different way (#4608 (comment)) than you, I'm not experimenting this. What about you, @stsewd? |
I haven't experiment this as well, I think that error is the same with the error permissions. |
Well, I don't know what's happening but after pulling latest master in both (.org and .com) I started having this issue and this PR solves this. I tried by building in .com and after applying this patch it worked. So, I don't understand why it wasn't happening before and it's happening now. |
Oh interesting. Perhaps we changed something with paths here lately. |
We were assuming this path before, which defaulted to the path you
executed django from on the host machine. The cwd was used in commands
run on inside Docker however. On Linux dev environments, this path is
most likely missing.
By specifying paths, we will get paths that have been created inside the
container.