-
Notifications
You must be signed in to change notification settings - Fork 294
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
Add pack remove-registry
command
#877
Conversation
7e57e71
to
51e843a
Compare
Codecov Report
@@ Coverage Diff @@
## main #877 +/- ##
==========================================
+ Coverage 76.15% 76.30% +0.16%
==========================================
Files 87 88 +1
Lines 4464 4493 +29
==========================================
+ Hits 3399 3428 +29
Misses 710 710
Partials 355 355
Flags with carried forward coverage won't be shown. Click here to find out more. |
f9009ee
to
b2a5386
Compare
internal/commands/remove_registry.go
Outdated
} | ||
config.Write(cfg, cfgPath) | ||
|
||
logger.Infof("Successfully removed %s to from registries", style.Symbol(registryName)) |
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.
logger.Infof("Successfully removed %s to from registries", style.Symbol(registryName)) | |
logger.Infof("Successfully removed %s from registries", style.Symbol(registryName)) |
internal/commands/remove_registry.go
Outdated
return nil | ||
}), | ||
} | ||
cmd.Example = "pack remove-registry myregistry" |
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.
nit: Move to the definition of the cobra.Command
if registryName == config.OfficialRegistryName { | ||
return errors.Errorf("%s is a reserved registry name, please provide a different registry", | ||
style.Symbol(config.OfficialRegistryName)) | ||
} |
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.
Are we sure this is the desired behavior? Users could want to remove it for security/compliance purposes, for instance
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.
The desired behavior is to always provide a functioning default registry by default, which is why we have this in place. For the question on security/compliance, I'm not concerned at this point. I'd rather get some customer feedback before making too many assumptions.
Signed-off-by: Travis <longoria.public@gmail.com>
b2a5386
to
e22e666
Compare
Summary
This PR provides a new
pack
command for removing registries viapack remove-registry
Output
New
Documentation
Related
Resolves #745