Better parameter documentation for `execute_run` -> `command`
Metadata
Current evaluation
Documentation request to clarify `command` parameter escaping in `execute_run`. Maintainer explained `shlex.join()` prevents shell metacharacters for security. Open for ~4 years.
Suggested action: keep open
Reason: Valid documentation improvement acknowledged by a maintainer. The maintainer clarified the security constraint behind `shlex.join()`, but the parameter docs still lack clear guidance on list formatting and escaping, warranting a doc update.
Impact:
40
Quick Win:
36.0
Staleness:
60
Complexity:
10
Confidence:
75
Support Request:
20
Issue body
The current docstring/param documentation looks like..
```
:param command: Command to execute.
```
When you have a look at the type annotations, it is clear that `command` is a list of "command parts". Unfortunately there is no description on how this list should look like
I had some issues creating a correct list for a `sed` command.
This was my attempt...
```
update_sources_list = [
"sed", "-i", f"'1s=^={lines}='", "/etc/apt/sources.list"
]
```
... and that even works when I join it and execute it, but it did not work when passing into `execute_run` as then some additional escaping happens, and the then assembled `sed` command was broken.
I'd appreciate an improved parameter documentation which clearly describes how the list should look like, especially when you need to escape things.
The solution to the above problem was to remove the single ticks, as after the list was passed into `execute_run` the list entry was escaped there.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen3.6-35b-a3b-mtp-q6 |
Impact:
40
Quick Win:
36.0
Staleness:
60
Complexity:
10
Confidence:
75
Support Request:
20
|
keep open | Documentation request to clarify `command` parameter escaping in `execute_run`. Maintainer explained `shlex.join()` prevents shell metacharacters for security. Open for ~4 years. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
70
Complexity:
20
Confidence:
85
Support Request:
30
|
keep open | Request for improved documentation on the command parameter list format and escaping rules. Maintainer explained shlex.join prevents shell injection in lxc exec, but no API change or doc update has been made. | |
| qwen3.6-35b-a3b-mtp-q6 |
Staleness:
55
Complexity:
20
Confidence:
85
Support Request:
40
|
keep open | Documentation request to clarify execute_run command parameter list format and escaping. Maintainer explained shlex.join prevents shell injection, but the API remains unintuitive for shell features. | |
| qwen3.6-35b-a3b-mtp-q6 |
Staleness:
80
Complexity:
15
Confidence:
85
Support Request:
50
|
keep open | Documentation request to clarify command list formatting and escaping, noting security constraints that block shell redirections. Acknowledged by maintainers but unaddressed. |
Update history
No update history recorded yet.
Related work
-
Duplicate Of:
craft-parts#211
(confidence 85%)
Identical documentation request filed in the craft-parts project.
Related issues
No related issues found above the similarity threshold.