Closed joshdick closed 4 years ago
Possibly related to #48.
@mefellows did we end up just saying that people had to have bash installed for all those alpine docker issues?
So this is at least more explicit, and so it's likely better because it should at least fail if bash isn't present with a clearer error.
Ideally, we drop down a level and make it work across all common shells (e.g. Ubuntu defaults to dash
or ash
, can't remember, Mac is now zsh
etc.). And then we wouldn't need to worry so much.
And yes, our docs explicitly state that bash is required for it to run. It just won't work on Alpine without it.
I had a look at doing cross shell compatible code, and it looks like it's far too complicated to be worth it, given we want to retire this package anyway. https://stackoverflow.com/questions/29832037/how-to-get-script-directory-in-posix-sh
pact-ruby-standalone
appears to be used by the @pact-foundation/pact NPM package.On macOS Catalina,
/bin/sh
defaults tozsh
when it previously used to default tobash
in earlier versions of macOS.This change breaks the following line that appears in many of the packaging scripts, which does not work properly in
zsh
:DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
Since I imagine most consumers of this package will have
bash
installed, I updated the shebang in all of the packaging scripts to explicitly use the default version ofbash
via/usr/bin/env
, rather than using the more general/bin/sh
, which may not actually bebash
.