You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If run.sh is configured with #!/bin/zsh or something other, that setting is ignored, which might lead to unexpected behaviour.
The runner could support a number of different shells and automatically invoke them by parsing the shebang. There are a few things to keep in mind about this:
The run.sh file format is not POSIX-compliant, due to the run:: prefix. /bin/sh or the like can therefore not be supported.
It might be difficult to reliably determine the shell name from the shebang string:
The path is not canonical, so it can be /bin/bash, /usr/bin/env bash, /usr/local/bin/bash etc.
It might not be safe to rely on the name of the shell executable
Shebangs are usually interpreted by the operating system, and so the behaviour is not standardised across OSses (see here for more reading). Not sure it’s a good idea or even possible to re-implement that properly.
So in the end, there might also be other approaches to solve this problem.
The text was updated successfully, but these errors were encountered:
jotaen
changed the title
Respect shebang of task file?
Respect shebang of task file
Dec 1, 2022
Currently, the
run.sh
task file is interpreted bybash
.If
run.sh
is configured with#!/bin/zsh
or something other, that setting is ignored, which might lead to unexpected behaviour.The runner could support a number of different shells and automatically invoke them by parsing the shebang. There are a few things to keep in mind about this:
run.sh
file format is not POSIX-compliant, due to therun::
prefix./bin/sh
or the like can therefore not be supported./bin/bash
,/usr/bin/env bash
,/usr/local/bin/bash
etc.So in the end, there might also be other approaches to solve this problem.
The text was updated successfully, but these errors were encountered: