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

Support command/exec lists #1518

Closed
eikenb opened this issue Oct 7, 2021 · 0 comments · Fixed by #1543
Closed

Support command/exec lists #1518

eikenb opened this issue Oct 7, 2021 · 0 comments · Fixed by #1543
Milestone

Comments

@eikenb
Copy link
Contributor

eikenb commented Oct 7, 2021

Currently configured commands/execs can take 2 forms. A single word/command (no spaces) that will get run directly on any supported OS and a full shell command line (with spaces) that is supported on *nix systems with an standard shell (/bin/sh) available. This limits the ability of people who do not have the shell available to only running single word commands which might be tough in some setups (might require a small binary wrapper).

To better support multiple command execution environments add support for direct execution lists. That is the command in a list form, with the list elements separated on the spaces of the command. These will be parsed into a Go string slice which can be directly passed to the underlying OS execution system call. This would then allow all commands, even those with arguments, to be directly run without the need for the wrapping shell call.

Some examples of what this will probably look like...

In HCL:

command = ["/usr/local/bin/awesome-app", "server"]

In JSON:

"command": ["/usr/local/bin/awesome-app", "server"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant