Open WillDaSilva opened 1 month ago
Hi @WillDaSilva! Thanks for reporting this.
We should fix both the docs and the functionality in this case—we should allow shell
to be a boolean or a string (with the boolean true
using the default shell for the platform, whereas a string would specify the shell to use).
We should also support specifying the command as a string instead of an array.
I'll keep you posted.
Bug
Current behavior
The documentation for
spec.shell
for every kind of exec action says:Expected behavior
It's unclear where/how "a different shell can be specified as a string". This issue is either a documentation bug if this feature – using a different shell – is supported but poorly documented, or a bug in the code if the
spec.shell
field is meant to accept strings.Reproducible example
Workaround
Use
spec.shell: false
, and then manually call the alternative shell inspec.command
:Suggested solution(s)
Make
spec.shell
aboolean | string
field, and have it interpret string values as the name/path of the shell that will be used. An example added to the documentation would be nice too.Your environment
garden version: 0.13.42