Closed oliverisaac closed 5 days ago
This is a simple enough feature to be added. Albeit it is a little convoluted, I believe you could accomplish this currently by wrapping your commands with bash -c "<command>"
For simple scripts that's fine but for more complex scripts the quoting can get bothersome.
I ended up customizing our atlantis image so that /bin/sh symlinks to /bin/bash and it works the way I want, so this is super low priority all things considered :)
I run into the similar issues and would be interested in implementing this feature. I was thinking of extending the run.command
interface to:
Replacing sh -c "command"
with bash -c "command"
, or other shells/interpreters (e.g. python -c "command"
):
- run:
command: |
# my bash script
output: hide
shell: bash
What do you think?
It'd be handy if we could set an env var or config option to use bash instead of sh when running commands:
https://github.com/runatlantis/atlantis/blob/4fc136c048c7489b12fefceed8563a96ac20054b/server/events/runtime/run_step_runner.go#L35