We currently have a set of .sh bash scripts which we've tweaked to work fine on both linux environments directly and bash on Windows.
It seems entrypoint can either be explicit and platform specific (e.g. /bin/bash) or not specified, in which case it auto-detects.
However neither of these options allow us to use cross-platform bash scripts.
Perhaps the Windows default of cmd.exe is a little presumptuous too, as I expect a large percentage of scripts on windows would be powershell (or bash). Also the defined scripts are written with a specific shell in mind, so running on different shells by default on different platforms, doesn't lend itself to cross-platform development.
Maybe rather than entrypoint, the user could specify a shell property, with values such as bash, powershell, cmd, etc and how to invoke that shell would become an implementation detail, e.g. using git bash/cygwin on windows.
We currently have a set of
.shbash scripts which we've tweaked to work fine on both linux environments directly and bash on Windows.It seems entrypoint can either be explicit and platform specific (e.g. /bin/bash) or not specified, in which case it auto-detects.
However neither of these options allow us to use cross-platform bash scripts.
Perhaps the Windows default of
cmd.exeis a little presumptuous too, as I expect a large percentage of scripts on windows would be powershell (or bash). Also the defined scripts are written with a specific shell in mind, so running on different shells by default on different platforms, doesn't lend itself to cross-platform development.Maybe rather than
entrypoint, the user could specify ashellproperty, with values such asbash,powershell,cmd, etc and how to invoke that shell would become an implementation detail, e.g. using git bash/cygwin on windows.