fix: propagate env vars with shell: cap.sh {0}#146
Conversation
Signed-off-by: Azeem Sajid <azeem.sajid@gmail.com>
Signed-off-by: Azeem Sajid <azeem.sajid@gmail.com>
Signed-off-by: Azeem Sajid <azeem.sajid@gmail.com>
shell: cap.sh {0}
|
I do not like this approach at all. Blindly exporting all environment variables that are set on the runner to the vm seems very wrong to me. Most of them are specific to the runner environment (hence the name, duh!) and either meaningless or outright wrong in the vm. |
|
Yes, for the reasons mentioned by manxorist the action is not already doing this. |
|
@manxorist, @jacob-carlborg Definitely, exporting everything would break things e.g. PATH, TERM, etc. How about a flag though e.g. shell: cpa.sh {0} --env-vars "VAR_1 VAR_2 MY_VAR_* VAR_*_TEST_*" |
Signed-off-by: Azeem Sajid <azeem.sajid@gmail.com>
|
A flag seems reasonable. But there's no reason to start using Python. Another dependency, starting another process, which is slower than running inside the already started Node process. |
Please feel free to update this or maybe close this in favor of an alternative implementation as you've a better understanding of all the internals and the related performance overheads. |
|
This has been implemented in bbc9473. |
Fixes #145.
Introduced
--env-varsto propagate specific env vars like this:Signed-off-by: Azeem Sajid azeem.sajid@gmail.com