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

Add ability to override shell used #117

Closed
jamietanna opened this issue Sep 23, 2023 · 5 comments · Fixed by #118
Closed

Add ability to override shell used #117

jamietanna opened this issue Sep 23, 2023 · 5 comments · Fixed by #118

Comments

@jamietanna
Copy link
Contributor

I.e. if I were to try and run demo with an Alpine-based distro, I receive the error:

2023/09/23 13:51:56 run failed: step command failed: exec: "bash": executable file not found in $PATH
exit status 1
@saschagrunert
Copy link
Owner

Sounds like a good feature, are you interested in contributing it @jamietanna? 🙂

@jamietanna
Copy link
Contributor Author

I'd be happy to! Any preference on the CLI option name that we'd be adding for this?

@saschagrunert
Copy link
Owner

@jamietanna I'm open to suggestions, thank you!

@jamietanna
Copy link
Contributor Author

jamietanna commented Sep 25, 2023

Maybe --shell (with no short option)?

@saschagrunert
Copy link
Owner

Maybe --shell (with no short option)?

Sounds good to me.

jamietanna added a commit to jamietanna/demo that referenced this issue Sep 25, 2023
As noted in saschagrunert#117, we want to override the shell that's used.

In the case that we want to override the shell, we unfortunately run
into the fact that `Ensure` requires `bash`.

We can start by defaulting to using `sh`, which should be fairly safe as
a drop-in.
jamietanna added a commit to jamietanna/demo that referenced this issue Sep 25, 2023
As noted in saschagrunert#117, we want to override the shell that's used.

To do so, we can continue using the default of `bash`, but allow
overriding it with the `--shell` flag.

Closes saschagrunert#117.
jamietanna added a commit to jamietanna/demo that referenced this issue Oct 1, 2023
As noted in saschagrunert#117, we want to override the shell that's used.

To do so, we can continue using the default of `bash`, but allow
overriding it with the `--shell` flag.

Closes saschagrunert#117.
jamietanna added a commit to jamietanna/demo that referenced this issue Oct 1, 2023
As noted in saschagrunert#117, we want to override the shell that's used.

To do so, we can continue using the default of `bash`, but allow
overriding it with the `--shell` flag.

We need to disable the gosec finding for the new shell argument:

  G204: Subprocess launched with a potential tainted input or cmd arguments (gosec)

As we're comfortable with the risk, as it runs on the user's machine.

Closes saschagrunert#117.
jamietanna added a commit to jamietanna/demo that referenced this issue Oct 20, 2023
As noted in saschagrunert#117, we want to override the shell that's used.

To do so, we can continue using the default of `bash`, but allow
overriding it with the `--shell` flag.

We need to disable the gosec finding for the new shell argument:

  G204: Subprocess launched with a potential tainted input or cmd arguments (gosec)

As we're comfortable with the risk, as it runs on the user's machine.

Closes saschagrunert#117.
jamietanna added a commit to jamietanna/demo that referenced this issue Oct 20, 2023
As noted in saschagrunert#117, we want to override the shell that's used.

To do so, we can continue using the default of `bash`, but allow
overriding it with the `--shell` flag.

We need to disable the gosec finding for the new shell argument:

  G204: Subprocess launched with a potential tainted input or cmd arguments (gosec)

As we're comfortable with the risk, as it runs on the user's machine.

Closes saschagrunert#117.
jamietanna added a commit to jamietanna/demo that referenced this issue Oct 20, 2023
As noted in saschagrunert#117, we want to override the shell that's used.

To do so, we can continue using the default of `bash`, but allow
overriding it with the `--shell` flag.

We need to disable the gosec finding for the new shell argument:

  G204: Subprocess launched with a potential tainted input or cmd arguments (gosec)

As we're comfortable with the risk, as it runs on the user's machine.

Closes saschagrunert#117.
saschagrunert pushed a commit that referenced this issue Oct 20, 2023
As noted in #117, we want to override the shell that's used.

In the case that we want to override the shell, we unfortunately run
into the fact that `Ensure` requires `bash`.

We can start by defaulting to using `sh`, which should be fairly safe as
a drop-in.
saschagrunert pushed a commit that referenced this issue Oct 20, 2023
As noted in #117, we want to override the shell that's used.

To do so, we can continue using the default of `bash`, but allow
overriding it with the `--shell` flag.

We need to disable the gosec finding for the new shell argument:

  G204: Subprocess launched with a potential tainted input or cmd arguments (gosec)

As we're comfortable with the risk, as it runs on the user's machine.

Closes #117.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants