ivanparvaresh / dotnet-exec

Execute shell script as dotnet tasks
MIT License
22 stars 3 forks source link

Cannot use with cross-platform bash scripts #42

Open justin-caldicott opened 3 years ago

justin-caldicott commented 3 years ago

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.

rolivares commented 4 months ago

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.