mirror of
https://github.com/helm/helm.git
synced 2026-05-28 04:35:48 -04:00
Update pkg/cmd/plugin_update.go
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: MrJack <36191829+biagiopietro@users.noreply.github.com>
This commit is contained in:
parent
d097385cf3
commit
3ed4d4ff01
1 changed files with 5 additions and 1 deletions
|
|
@ -92,7 +92,11 @@ func (o *pluginUpdateOptions) complete(args []string) error {
|
|||
}
|
||||
if version != "" {
|
||||
if _, err := semver.StrictNewVersion(version); err != nil {
|
||||
return fmt.Errorf("invalid version %q for plugin %q: must be an exact semver version (e.g. 1.2.3); the \"v\" prefix is not allowed", version, name)
|
||||
errMsg := fmt.Sprintf("invalid version %q for plugin %q: must be an exact semver version (e.g. 1.2.3); semver range constraints (e.g. ~1.2, ^1.0.0, >=1.0.0) are not supported", version, name)
|
||||
if strings.HasPrefix(version, "v") {
|
||||
errMsg += `; the "v" prefix is not allowed`
|
||||
}
|
||||
return fmt.Errorf("%s", errMsg)
|
||||
}
|
||||
}
|
||||
o.plugins[name] = version
|
||||
|
|
|
|||
Loading…
Reference in a new issue