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

Make remote command shell act as a login shell #796

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pstef
Copy link

@pstef pstef commented Aug 14, 2024

This commit adds a parameter to the run_command() method call. The value differs from the pssh's default '$SHELL -c' by adding '-l' to make the shell act as a login shell.

This results in loading .bash_profile or .profile, depending on which shell it is and other circumstances.

The reason to load a profile file is to set up environment, for example PATH.

This is especially handy in environments where Python virtual envs are used. There, to use one, the user has to activate the env by sourcing a file.

This commit adds a parameter to the run_command() method call. The
value differs from the pssh's default '$SHELL -c' by adding '-l'
to make the shell act as a login shell.

This results in loading .bash_profile or .profile, depending on
which shell it is and other circumstances.

The reason to load a profile file is to set up environment, for
example PATH.

This is especially handy in environments where Python virtual envs
are used. There, to use one, the user has to activate the env by
sourcing a file.
Copy link

No linked issues found. Please add the corresponding issues in the pull request description.
Use GitHub automation to close the issue when a PR is merged

Copy link

sonarcloud bot commented Aug 14, 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.

1 participant