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

[RFE] Disallow spaces in the command parameter #59

Open
Fryguy opened this issue Feb 1, 2021 · 1 comment
Open

[RFE] Disallow spaces in the command parameter #59

Fryguy opened this issue Feb 1, 2021 · 1 comment

Comments

@Fryguy
Copy link
Member

Fryguy commented Feb 1, 2021

This would enforce the usage of the :params when needed, and a user would not be able to bypass it. If they are going to bypass anyway, then there is no point in using AwesomeSpawn.

The only use case we might have to account for is sudo. I say might, because one case easily do

AwesomeSpawn.run!("sudo", :params => ["echo", "hi")

But that is kind of weird. I think I'd prefer another param:

AwesomeSpawn.run!("echo", :params => "hi", :sudo => true)
AwesomeSpawn.run!("echo", :params => "hi", :sudo => "someuser")

Which would be nice because a caller could build the options and call it, then on failure just tack in another option (instead of having to re-call AwesomeSpawn and reorder all of the params.

@chessbyte
Copy link
Member

yeah, I like :sudo as another parameter, because it is not the actual command

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

No branches or pull requests

3 participants