-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cleanup logic for skipping essential plugins #704
Conversation
Signed-off-by: Marc Khouzam <marc.khouzam@broadcom.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgmt. Thanks for the changes
|
||
// Prompt for CEIP agreement | ||
if !shouldSkipPrompts(cmd) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Join the two identical ifs
if err := cliconfig.ConfigureCEIPOptIn(); err != nil { | ||
return err | ||
} | ||
} | ||
|
||
// Install or update essential plugins | ||
InstallEssentialPlugins(cmd) | ||
if !shouldSkipEssentialPlugins(cmd) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Follow the same pattern as the checks above.
"tanzu plugin clean", | ||
// Avoid trying to install essential plugins when the user initializes or updates the plugin | ||
// source information since the essential plugins installation would use the old plugin source | ||
"tanzu plugin source", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No change in the list of commands, just fixed the comments and used isSkipCommand()
below instead of having code duplication.
Signed-off-by: Marc Khouzam <marc.khouzam@broadcom.com>
Signed-off-by: Marc Khouzam <marc.khouzam@broadcom.com>
What this PR does / why we need it
This is a small cleanup PR which removes some code duplication and fixes some invalid comments.
There is no functionality change.
Which issue(s) this PR fixes
Fixes # N/A
Describe testing done for PR
Let CI run
Release note
Additional information
Special notes for your reviewer