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

Update $PWD in environment for base.command processes #114

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

uwefladrich
Copy link
Owner

When commands are executed via the base.command task, they generally inherit the environment from the se process. Since se is a Python script, some things work differently compared to shell scripts. One such thing is that $PWD is not updated when base.command is run with the cwd argument, i.e. when the current working directory is changed. This is because Python does not behave like bash or other shells and subprocess.Popen is not updating $PWD! Or seen the other way around, $PWD is a shell environment variable and subprocess does not fiddle with it (see, for example, here).

However, the base.command task it is often used to run shell scripts and therefore it is expected that $PWD is updated as it would in a shell. Thus, updating $PWD should be implemented in base.command.

@uwefladrich uwefladrich self-assigned this Apr 12, 2024
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

Successfully merging this pull request may close these issues.

None yet

1 participant