From 3ed4d4ff019edd59e54da474211da5836445906b Mon Sep 17 00:00:00 2001 From: MrJack <36191829+biagiopietro@users.noreply.github.com> Date: Mon, 9 Mar 2026 09:49:11 +0100 Subject: [PATCH] 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> --- pkg/cmd/plugin_update.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkg/cmd/plugin_update.go b/pkg/cmd/plugin_update.go index 3bb2a5c6c..b9b64f118 100644 --- a/pkg/cmd/plugin_update.go +++ b/pkg/cmd/plugin_update.go @@ -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