Closed cmaglie closed 2 weeks ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 70.28%. Comparing base (
3f0d43f
) to head (0beb1b6
). Report is 1 commits behind head on master.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Is it intentional that when requesting the command below the json output omits the
warnings
key, but when requesting with a subcommand different from config thewarnings
key appears?
Yes, that's because the returned JSON is a string and there is no way to fit a warning
field inside.
We should have made it an object instead, like:
{
"value": "/home/ale/.arduino15",
"warnings": [
"Invalid value in configuration: schema not defined for key 'asldfasdfasdf'"
]
}
but now it's too late, it would be for CLI 2.0.0 :-)
Please check if the PR fulfills these requirements
See how to contribute
UPGRADING.md
has been updated with a migration guide (for breaking changes)configuration.schema.json
updated if new parameters are added.What kind of change does this PR introduce?
Prints configuration warnings in text mode only if running one of the
config ...
commands. Previously if there was an error in the configuration file, the warning was printed on all commands run from the cli. In JSON mode the warning is always returned.Also improve the error message from:
to
What is the current behavior?
What is the new behavior?
Does this PR introduce a breaking change, and is titled accordingly?
Other information
Partially fix #2638