KuthumiPepple commented on a change in pull request #3153:
URL: https://github.com/apache/camel-k/pull/3153#discussion_r839053149



##########
File path: pkg/cmd/version.go
##########
@@ -171,15 +171,15 @@ func operatorVersion(ctx context.Context, c 
client.Client, namespace string) (st
        return infos[infoVersion], nil
 }
 
-func compatibleVersions(aVersion, bVersion string) bool {
+func compatibleVersions(aVersion, bVersion string, cmd *cobra.Command) bool {
        a, err := semver.NewVersion(aVersion)
        if err != nil {
-               fmt.Printf("Could not parse %s (error: %s)\n", a, err)
+               fmt.Fprintf(cmd.ErrOrStderr(), "Could not parse %s (error: 
%s)\n", a, err)

Review comment:
       done

##########
File path: pkg/cmd/version.go
##########
@@ -171,15 +171,15 @@ func operatorVersion(ctx context.Context, c 
client.Client, namespace string) (st
        return infos[infoVersion], nil
 }
 
-func compatibleVersions(aVersion, bVersion string) bool {
+func compatibleVersions(aVersion, bVersion string, cmd *cobra.Command) bool {
        a, err := semver.NewVersion(aVersion)
        if err != nil {
-               fmt.Printf("Could not parse %s (error: %s)\n", a, err)
+               fmt.Fprintf(cmd.ErrOrStderr(), "Could not parse %s (error: 
%s)\n", a, err)
                return false
        }
        b, err := semver.NewVersion(bVersion)
        if err != nil {
-               fmt.Printf("Could not parse %s (error: %s)\n", b, err)
+               fmt.Fprintf(cmd.ErrOrStderr(), "Could not parse %s (error: 
%s)\n", b, err)

Review comment:
       done




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to