When I use setup-miniconda, it uses shell: bash -l {0} in GitHub Actions:
jobs:
foo:
name: Foo
runs-on: "ubuntu-latest"
defaults:
run:
shell: bash -l {0}
When I use CML. It only uses shell: bash without -l {0}.
I found some explanation at GitHub Actions doc:
You can set the
shellvalue to a template string usingcommand […options] {0} [..more_options]. GitHub interprets the first whitespace-delimited word of the string as the command, and inserts the file name for the temporary script at{0}.
However, I am still not clear what are the functions of -l and {0}? For -l, is it a parameter of bash?
Appreciate for some explanations!
That could be linked to issue 128 which states:
I got stuck for a while because my run commands were not using a login bash shell.
So the conda environment was not active.Would be helpful to warn about that and recommend something like the following in the yaml:
defaults:
run:
shell: bash -l {0}
With:
-l to insure a login bash, where the environment is correctly set;{0}, a template placeholder, replaced at pipeline execution time by the actual script command to execute.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With