Skip to content
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

Allow runnning executables directly without shell wrapper #88

Closed
adrian-gierakowski opened this issue Sep 2, 2023 · 4 comments
Closed
Labels
enhancement New feature or request

Comments

@adrian-gierakowski
Copy link
Contributor

Feature Request

I’d like to be able to specify a command as a list of: [executable, args…] and have it ran directly instead of via a shell.

Note that I’m willing to implement this.

Use Case:

Reducing dependencies needed to run the processes or double-wrapping in a shell, if my executable is already a shell script, which calls other executables.

Proposed Change:

Allow process.command to be an array, in which case it would be invoked directly

Who Benefits From The Change(s)?

People wanting to minimise the deps of their projects.

Alternative Approaches

Not sure.

@adrian-gierakowski
Copy link
Contributor Author

seems like union types are a pain in go (I'm might be wrong since I have very little experience with this language) so making command a string | []string might not be the best choice

Adding optional args []string and a bool flag to disable shell for given process would probably make more sense, although would result in a more verbose config

@F1bonacc1
Copy link
Owner

Hi @adrian-gierakowski,

That's an interesting proposal. Will it work for you to replace the command with ${COMMAND_WITH_ARGS_FOR_SOME_PROC} environment variable place holder and provide the value for the env variable externally?

@adrian-gierakowski
Copy link
Contributor Author

That's an interesting proposal. Will it work for you to replace the command with ${COMMAND_WITH_ARGS_FOR_SOME_PROC}

I think an array filed is required to simplify passing of args with spaces

I've included a draft implementation in #89

@F1bonacc1
Copy link
Owner

F1bonacc1 commented Nov 18, 2023

#89 Is merged in v0.75.1
Thank you @adrian-gierakowski !!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants