[Bug]: error messages and warnings should consistently go to stderr
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
Research direction
Start with the linode-cli command path exercised by linode-cli linodes create ... --json, reproducing the pipeline through jq -r .[].id. Trace where the shown default-values warning is emitted and verify that successful JSON remains on stdout while warnings and errors go to stderr. Done means the pipeline produces 12345678 without the warning contaminating its input.
Written by the indexing model from the issue text.
Description
CLI Version
linode-cli v5.51.0 Built from spec version 4.176.0
Command
linode-cli linodes create [...args...] --json | jq -r .[].id
Output
parse error: Invalid numeric literal at line 1, column 6
Expected Behavior
12345678
Actual Behavior
The problem occurs because linode-cli prints warnings and error messages to stdout. In this case, the (successful) command prints
Using default values: {'authorized_users': ['jschauma']}; use the --no-defaults flag to disable defaults
to stdout before printing the json output. This then leads to tools not being able to consume the output as expected.
The correct behavior here is to send all error messages and warnings to stderr, like a good little Unix tool.
Steps to Reproduce
linode-cli linodes create [...args that produce a warning...] --json | jq -r .[].id
- Dominant language
- Python
- Stars
- 442
- Forks
- 159
- Avg merge
- 7d 21h
- Merged PRs (30d)
- 8
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.
More from linode/linode-cli
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
linode/linode-cli#894 ·
-
enhancement
Difficulty 1/5 Under an hour Newbie friendliness 85/100
linode/linode-cli#859 · 1 comment ·
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 35/100
linode/linode-cli#868 ·
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 45/100
linode/linode-cli#825 · 1 comment ·
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 35/100
linode/linode-cli#788 ·
All issues in linode/linode-cli
Similar issues
-
Add: hunch Open
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
AbdelStark/awesome-typesafe#104 ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
DiamondLightSource/dodal#2211 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
openml/openml-python#1749 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
sipyourdrink-ltd/bernstein#6191 ·