Skip to content

Commit a9ee123

Browse files
acornett21 review
Signed-off-by: Pascal Bourdier <[email protected]>
1 parent b39ae15 commit a9ee123

File tree

1 file changed

+4
-1
lines changed
  • internal/plugins/helm/v1

1 file changed

+4
-1
lines changed

internal/plugins/helm/v1/api.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,5 +235,8 @@ func (p *createAPISubcommand) Scaffold(fs machinery.Filesystem) error {
235235

236236
// hasDifferentCRDVersion returns true if any other CRD version is tracked in the project configuration.
237237
func hasDifferentAPIVersion(versions []string, version string) bool {
238-
return len(versions) != 0 && (len(versions) != 1 || versions[0] != version)
238+
if len(versions) == 0 {
239+
return false
240+
}
241+
return len(versions) > 1 || versions[0] != version
239242
}

0 commit comments

Comments
 (0)