Closed casperdcl closed 2 years ago
What about #!/bin/bash -l
in the shebang? 😉
Exactly what I was thinking, though haven't tested and not sure about side-effects.
I have tested it, and it works.
a.sh
with #!/bin/sh -l
and env
and give it execution permissionsb.sh
with #!/bin/sh
and env
and give it execution permissionsenv -i ./a.sh
and env -i ./b.sh
to verify that profile
is being sourced on the formernot sure about side-effects
What could possibly go wrong? 😄
There are a few #!/bin/sh
littered around this repo which could potentially be changed to #!/bin/sh -l
? Might be a good idea to fully support custom image
s.
Have you found any other #!/bin/.*sh
that could benefit from being a login shell?
things that affect runner
?
As long as runners don't support custom images, there is no reason to do the same. 🤔
script = "#!/bin/bash ..."
doesn't source from/etc/profile
. This leads to confusion.prints nothing:
prints something:
ssh $instance_ip && echo $LD_LIBRARY_PATH