Skip to content

Commit

Permalink
Default run.shell to /bin/sh
Browse files Browse the repository at this point in the history
`/bin/bash` is not availabe on some popular distributions, for example
NixOS. Defaulting to the more conservative `/bin/sh` improves
portability.
  • Loading branch information
tobim committed Jul 11, 2023
1 parent ee9d862 commit 6b035b7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions invoke/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -445,11 +445,11 @@ def global_defaults() -> Dict[str, Any]:
# unqualified cmd.exe otherwise.
if WINDOWS:
shell = os.environ.get("COMSPEC", "cmd.exe")
# Else, assume Unix, most distros of which have /bin/bash available.
# TODO: consider an automatic fallback to /bin/sh for systems lacking
# /bin/bash; however users may configure run.shell quite easily, so...
# Else, assume a POSIX compatible Unix, where /bin/sh is mandated by
# the standard. Users on more exotic platforms are expected to configure
# run.shell manually.
else:
shell = "/bin/bash"
shell = "/bin/sh"

return {
# TODO: we document 'debug' but it's not truly implemented outside
Expand Down

0 comments on commit 6b035b7

Please sign in to comment.