diff --git a/internal/plugin/installer/vcs_installer_test.go b/internal/plugin/installer/vcs_installer_test.go index a679bb153..e40cb4243 100644 --- a/internal/plugin/installer/vcs_installer_test.go +++ b/internal/plugin/installer/vcs_installer_test.go @@ -220,8 +220,8 @@ func TestVCSInstallerUpdateWithVersion(t *testing.T) { t.Fatal(err) } - // Now test update with specific version constraint - vcsInstaller.Version = "~0.1.0" + // Now test update with specific version + vcsInstaller.Version = "0.1.1" if err := Update(vcsInstaller); err != nil { t.Fatal(err) } @@ -229,7 +229,7 @@ func TestVCSInstallerUpdateWithVersion(t *testing.T) { t.Fatalf("expected version '0.1.1', got %q", repo.current) } - // Test update with different version constraint + // Test update with different version vcsInstaller.Version = "0.2.0" if err := Update(vcsInstaller); err != nil { t.Fatal(err) diff --git a/pkg/cmd/plugin_update.go b/pkg/cmd/plugin_update.go index b8c43dcb0..6bffe1658 100644 --- a/pkg/cmd/plugin_update.go +++ b/pkg/cmd/plugin_update.go @@ -39,7 +39,7 @@ const pluginUpdateDesc = `Update one or more Helm plugins. An exact semver version can be supplied per-plugin using the @version syntax: helm plugin update myplugin@1.2.3 otherplugin@2.0.0 - helm plugin update myplugin@v1.0.0 + helm plugin update myplugin@1.0.0 Range constraints (e.g. ~1.2, ^1.0.0, >=1.0.0, v1.0.0) are not supported. @@ -86,7 +86,7 @@ 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)", version, name) + 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) } } o.plugins[name] = version