fix(plugin): skip min version check in dev mode
Ignore `MinCLIVersion` validation when the current CLI version is "dev". This allows plugins to be loaded during local development and testing without being blocked by strict semantic version constraints.
This commit is contained in:
1 parent
408098bdc1
commit
d259864a2b
1 file changed
+1
-1
@@ -124,7 +124,7 @@ func (m *Manifest) Validate(cliVersion string) error {
|
||||
if m.Type != "" && m.Type != "managed" && m.Type != "user" {
|
||||
return fmt.Errorf("invalid plugin type %q: must be \"managed\" or \"user\"", m.Type)
|
||||
}
|
||||
if m.MinCLIVersion != "" && cliVersion != "" {
|
||||
if m.MinCLIVersion != "" && cliVersion != "" && cliVersion != "dev" {
|
||||
if compareSemver(cliVersion, m.MinCLIVersion) < 0 {
|
||||
return fmt.Errorf("plugin requires CLI >= %s, current is %s", m.MinCLIVersion, cliVersion)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user