ManageIQ / ManageIQ/awesome_spawn
[RFE] Disallow spaces in the command parameter
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 9
- Forks
- 14
- PR merge metrics
- No merged PRs in 30d
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the AwesomeSpawn.run! entry point and trace how its command and params arguments are handled. Clarify whether the requested change is only rejecting spaces in the command or also adding sudo support, then define tests for the accepted and rejected forms before implementation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100