-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: use users standard shell (zsh/bash) instead of sh OR make shell configurable #54
Comments
Happy to hear that you find mprocs useful. I wanted to use default shell but quickly gave up on that idea. I think it will bring a lot of confusion if the same mprocs.yaml is used by different users. Another option is to implement additional fields in config for configuring the shell to use. But I think it would be easier to manually call desired shell: procs:
proc1:
cmd: ["zsh", "-c", "my-command"] But I'm not sure which arguments to pass to load user's shell rc file. |
FYI, |
Using the standard shell would be inconsistent, and having an additional field for configuring the shell would be about as verbose as using procs:
example:
use_shell: "bash"
shell: "echo 'Hello World!'" The difference between use_shell and shell is ambiguous, and I cannot think of a good naming scheme that doesn't result in similar ambiguity. I do have an alternative suggestion. Add support for 3 more keys: bash, zsh, and fish. Each key would act the same as shell does, but uses the shell corresponding to its name instead of sh. I believe this has a very low chance of causing confusion compared to other ideas. I can implement this next week and open a PR if the feature is desirable. |
I would like this feature too. I'm not committing my mprocs file to code, so it's not shared. (Which either way in my case might make no sense, since I cd into different directories where my projects are, where another developer might not have access to all repos or in other locations). In my case, I'm trying to change node versions using nvm, but that is sourced from my .zshrc file. Prepending |
In our development team, we use mprocs as a great lightweight alternative to docker-compose which brings its own set of problems and complexity. So thanks for mprocs, awesome tool! :)
However, we stumbled over the issue that mprocs is executing everything within
sh
instead of using the current users default shell (e.g. zsh, bash). While this results in reproducibility, it also makes it more complex to set up the environment. To be very concrete, we use direnv to "configure" our development environment. direnv hooks into zsh/bash/fish by having e.g..zshrc
executing an init hook. Because mprocs is using sh,.zshrc
,.bashrc
and the likes are never executed.Our wish would be that mprocs would either
a) use the users standard shell (e.g. by evaluating $SHELL, not sure if that's portable enough), or
b) would have the shell configurable within mprocs.json
The text was updated successfully, but these errors were encountered: