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

Environment variables set within setenv.sh gets lost to pipe subprocess #74

Open
sich97 opened this issue Feb 18, 2025 · 1 comment
Open

Comments

@sich97
Copy link

sich97 commented Feb 18, 2025

When using export within the setenv.sh's for loop, the environment variable gets set within the while IFS= read -r line pipe's subprocess' environment, resulting in the environment variable not applying for the intended user.

@sich97
Copy link
Author

sich97 commented Feb 18, 2025

This can be solved by changing (line 23)

echo "$ENV_VARS" | while IFS= read -r line; do export $line done

to

while IFS= read -r line; do export $line done < <(echo "$ENV_VARS")

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