dotnet-exec icon indicating copy to clipboard operation
dotnet-exec copied to clipboard

Cannot use with cross-platform bash scripts

Open justin-caldicott opened this issue 4 years ago • 1 comments

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.

justin-caldicott avatar Jul 15 '21 13:07 justin-caldicott

It could be great. We work on cross-platform environment so it's difficult for us to maintain always updated that configuration and linux compatible commands get many problems. Having the possibility to use PowerShell instead for example could be great. Some process to discovery the entrypoint if is not explicit could be great.

rolivares avatar Jul 24 '24 17:07 rolivares