[BUG] salt-ssh 3007.0 attempts to run commands in default shell, even if default shell is fish
@Akm0d is already working on this.
Since Mar 26, 2024.
- Dominant language
- Python
- Stars
- 15.7k
- Forks
- 5.6k
- Avg merge
- 2d 44m
- Merged PRs (30d)
- 80
Description
Description
salt-ssh attempts to run commands in the default shell, even if the default shell is fish. For example, { ... } from here is valid in bash, but this causes an error in fish:
fish: Unknown command: '{ brew --prefix }'
fish: '{ ... }' is not supported for grouping commands. Please use 'begin; ...; end'
Setup
- onedir packaging 3007.0
- macOS Sonoma 14.4
Steps to Reproduce the behavior
brew install fish
chsh -s /opt/homebrew/bin/fish
Close and re-open Terminal.app
Run any salt-ssh command
Expected behavior
No hang or error.
Versions Report
Cannot run salt --versions-report as it hangs instead.
Additional context
My present workaround is:
chsh -s /bin/bash
And set Terminal > Settings... > Shells open with: to Command (complete path): with /opt/homebrew/bin/fish
This leaves $SHELL set to /bin/bash.
Note that the comment here is both out-of-date and incorrect (su doesn't run sh – it runs the user's login shell, which can be any valid shell)
The previous line of code it refers to was:
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.