Skip to content

Commit

Permalink
cli: check if project is v1 when validating default plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
estroz committed Apr 14, 2020
1 parent 478c233 commit e4b8d15
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -300,9 +300,9 @@ func (c cli) validate() error {
if _, versionFound := c.pluginsFromOptions[c.projectVersion]; !versionFound {
return fmt.Errorf("no plugins for project version %q", c.projectVersion)
}
// If --plugins is not set, no layout exists, and no defaults exist, we
// cannot know which Getter to use for a plugin type.
if !c.configured && len(c.cliPluginKeys) == 0 {
// If --plugins is not set, no layout exists (no config or project is v1),
// and no defaults exist, we cannot know which plugins to use.
if (!c.configured || c.projectVersion == config.Version1) && len(c.cliPluginKeys) == 0 {
_, versionExists := c.defaultPluginsFromOptions[c.projectVersion]
if !versionExists {
return fmt.Errorf("no default plugins for project version %s", c.projectVersion)
Expand Down

0 comments on commit e4b8d15

Please sign in to comment.