cli: add missing logger to versionCollector object (#1183)

Co-authored-by: Daniel Weiße <66256922+daniel-weisse@users.noreply.github.com>
This commit is contained in:
Otto Bittner 2023-02-14 14:46:30 +01:00 committed by GitHub
parent b8112f3dc2
commit 1c977b3105
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -82,6 +82,7 @@ func runUpgradeCheck(cmd *cobra.Command, args []string) error {
rekor: rekor,
flags: flags,
cliVersion: constants.VersionInfo,
log: log,
},
log: log,
}
@ -316,7 +317,7 @@ func (v *versionCollector) newImages(ctx context.Context, version string, csp cl
if !v.flags.force {
return nil, fmt.Errorf("cluster image version (%s) newer than CLI version (%s)", currentImageMinorVer, currentCLIMinorVer)
}
if _, err := fmt.Fprintf(v.writer, "WARNING: CLI version is older than cluster image version. Continuing due to force flag."); err != nil {
if _, err := fmt.Fprintln(v.writer, "WARNING: CLI version is older than cluster image version. Continuing due to force flag."); err != nil {
return nil, fmt.Errorf("writing to buffer: %w", err)
}
case cliImageCompare == 0: