bottlerocket-os / bottlerocket-os/bottlerocket
incorrect apiclient exec argument parsing
- Dominant language
- Rust
- Stars
- 9.7k
- Forks
- 586
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 12
Description
**Image I'm using:**
`aws-dev`
**What I expected to happen:**
`apiclient` should pass the `-v` argument to the executed command.
```
$ apiclient exec admin uname -v
#1 SMP Thu Nov 9 07:59:43 UTC 2023
```
**What actually happened:**
`apiclient` interprets the `-v` itself, sets verbose mode, and does not pass the argument to the executed command.
```
$ apiclient exec admin uname -v
16:15:01 [DEBUG] (1) apiclient::exec::terminal: Detected tty: true
16:15:01 [DEBUG] (1) apiclient::exec::terminal: Setting terminal to raw mode, sorry about the carriage returns
...
Linux
```
**How to reproduce the problem:**
See above.
Contributor guide
Research direction
Start at the apiclient exec argument-parsing entry point and reproduce the reported command with `apiclient exec admin uname -v`. Trace how `-v` is classified, then verify that it reaches `uname` rather than enabling apiclient verbose logging; the command should print the kernel version without apiclient debug output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100