Open anthonator opened 2 years ago
As near as I can tell, the only bash-ism in the project is the zombie_killer
script. Is that what you're referring to?
Everything below is based on the assumption that you're referring to that script.
I'm definitely open to a change that makes it work for more people, but some things to be aware of:
/bin/sh
, but was changed to bash due to an incompatibility on some OSes (ones that use dash
instead of sh
). See the PR that made this change.Given the above, the best approach might be to come up with a more portable version of the script and submit that upstream to the Elixir repo. Once accepted there, we can update our version of the script here.
I won't have a good way to test an updated script on a variety of OSes/shells, so I'd want some confidence that any changes aren't going to break things for people running in other environments.
Would you be open to a possible ENV var or other configuration setting that would make that configurable? We use a docker image that doesn't have bash
installed by default (since it is an alpine
based image).
I could see something like:
zombie_killer.sh
zombie_killer.bash
with an optional ENV var of MIX_TEST_INTERACTIVE_SHELL to switch between the two (obviously defaulting to the current bash
implementation).
In an ideal world, I'd prefer to just have the one script, but like you said, trying to come up with a portable and well-tested script on a variety of OSes/shells is a difficult task.
@jacobsmith I think that'd be OK as long as it doesn't turn into a massive number of different versions of the script.
Probably an env var is the best approach here rather than using app config, because I could imagine different people on the same project using different shells. An env var makes it relatively easy for each of them to use the appropriate script for their own system.
I was wondering if there is any interest in supporting
ash
in addition to the current support forbash
. I imagine a lot of people in the community use Alpine images and adding another shell might not be the most appealing option.I'd be happy to work on this if you'd accept a PR.