-
Notifications
You must be signed in to change notification settings - Fork 369
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
skip/fail upgrade if no longer matches a platform (#427)
It turns out when upgrade process looks to a plugin manifest that exists but does no longer have a matching Platform spec, we were returning nil error, which was surfacing as "upgraded" (see #423). This addresses the problem by returning an error in this case. However, the 'upgrade' command fails with this error if a plugin list is given to the cmd. If 'krew upgrade' is called without args (i.e. upgrade all plugins), ensuring this doesn't fail the cmd, but prints warnings (just like current 'Skipping' behavior this cmd has). I think this 'skipping with a warning' behavior is justified because it can make upgrade command entirely malfunctional when a plugin manifest is updated breaking the upgrades for that plugin. (There are still some cases that make 'upgrade' command fatally fail, such as an installed plugin gone from manifest, which we should address separately.) Adding integration tests to capture both cases. Signed-off-by: Ahmet Alp Balkan <[email protected]>
- Loading branch information
1 parent
e37ee1d
commit a6ac816
Showing
3 changed files
with
42 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters