Bug #2193
Exec's "command" parameter should accept lists in addition to strings
| Status: | Duplicate | Start date: | 04/24/2009 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | - | % Done: | 0% |
|
| Category: | exec | |||
| Target version: | - | |||
| Affected Puppet version: | 0.25.0 | Branch: | ||
| Keywords: | ||||
| Votes: | 1 |
Description
Currently, “exec” executes its “command” by passing a string to Kernel#exec, which subjects the command to shell-expansion.
There are many use cases where the user knows the exact command they wish to execute, and does not want the shell involved at all in the execution (say, for example, you’re trying to pass an argument to a command that has weird characters in it that the shell would normally expand out).
Exec’s “command” param should accept a list as input, where the list follows the format accepted by Kernel#exec (“If multiple arguments are given, the second and subsequent arguments are passed as parameters to command with no shell expansion.”).
I’ve attached a patch against 0.25 HEAD (minimally tested)…hopefully that can be a starting point for development.
Related issues
History
Updated by James Turnbull about 3 years ago
- Status changed from Unreviewed to Needs Decision
- Assignee set to Luke Kanies
- Target version set to 4
Updated by Luke Kanies about 3 years ago
- Status changed from Needs Decision to Accepted
- Target version changed from 4 to 2.6.0
I’m fine with this (and it’s customer work, so I’ll get it done in the next release).
Updated by James Turnbull over 2 years ago
- Target version changed from 2.6.0 to 2.7.x
Updated by Luke Kanies about 2 years ago
- Assignee changed from Luke Kanies to Markus Roberts
Updated by Markus Roberts about 2 years ago
At the very least the description on the ticket is no longer accurate; we require an array (not a string) in lib/puppet/util.rb’s execute. I suspect that this was the case at the time the patch was written as well.
Updated by Joshua Lifton 5 months ago
- Assignee deleted (
Markus Roberts)
This issue was assigned to a former Puppet Labs employee. Adding back to the pool of unreviewed issues.
Updated by Joshua Lifton 5 months ago
This issue was assigned to a former Puppet Labs employee. Adding back to the pool of unreviewed issues.
Updated by Ben Hughes 4 months ago
- Description updated (diff)
- Status changed from Accepted to Unreviewed
Updated by Luke Kanies 4 months ago
- Description updated (diff)
- Status changed from Unreviewed to Accepted
Updated by Deepak Giridharagopal 4 months ago
- Status changed from Accepted to Duplicate
Updated by Daniel Pittman 2 months ago
- Target version deleted (
2.7.x)