Do not show available updates with version
if updater.enable_notification=false
#2055
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Please check if the PR fulfills these requirements
See how to contribute
before creating one)
our contributing guidelines
UPGRADING.md
has been updated with a migration guide (for breaking changes)What kind of change does this PR introduce?
Code enhancement
What is the current behavior?
The command
arduino-cli version
always shows if there is an available update, even ifupdater.enable_notification
is set tofalse
.What is the new behavior?
arduino-cli version
no longer ignores the flagupdater.enable_notification
.Does this PR introduce a breaking change, and is titled accordingly?
No.
Other information
To test this change, I manually modified the
ldflags
to build an outdated version of the CLI, then setupdater.enable_notification
tofalse
.If
updater.enable_notification
is set totrue
, the command behaves normally. I must point out that, as of now,arduino-cli version
shows if any updates are available only once every 24h, sinceCheckForUpdate()
relies also on this check:Here is an example: