You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by pc...@apache.org on 2022/10/07 13:22:03 UTC

[camel-k] branch release-1.10.x updated: fix(cli): don't verify operator

This is an automated email from the ASF dual-hosted git repository.

pcongiusti pushed a commit to branch release-1.10.x
in repository https://gitbox.apache.org/repos/asf/camel-k.git


The following commit(s) were added to refs/heads/release-1.10.x by this push:
     new 93443c3aa fix(cli): don't verify operator
93443c3aa is described below

commit 93443c3aacebd569bc249c46a5945aee77adc13a
Author: Pasquale Congiusti <pa...@gmail.com>
AuthorDate: Fri Oct 7 12:33:02 2022 +0200

    fix(cli): don't verify operator
    
    when in offline mode
    
    Closes #3662
---
 pkg/cmd/bind.go | 2 +-
 pkg/cmd/run.go  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/pkg/cmd/bind.go b/pkg/cmd/bind.go
index d956bf271..a5d4a3826 100644
--- a/pkg/cmd/bind.go
+++ b/pkg/cmd/bind.go
@@ -236,7 +236,7 @@ func (o *bindCmdOptions) run(cmd *cobra.Command, args []string) error {
 		binding.Annotations = make(map[string]string)
 	}
 
-	if o.OperatorID != "" {
+	if !isOfflineCommand(cmd) && o.OperatorID != "" {
 		if err := verifyOperatorID(o.Context, client, o.OperatorID, cmd.OutOrStdout()); err != nil {
 			if o.Force {
 				o.PrintfVerboseErrf(cmd, "%s, use --force option or make sure to use a proper operator id", err.Error())
diff --git a/pkg/cmd/run.go b/pkg/cmd/run.go
index b1e23aa6e..128ef89a2 100644
--- a/pkg/cmd/run.go
+++ b/pkg/cmd/run.go
@@ -623,7 +623,7 @@ func (o *runCmdOptions) applyAnnotations(cmd *cobra.Command, c client.Client, it
 		it.Annotations = make(map[string]string)
 	}
 
-	if o.OperatorID != "" {
+	if !isOfflineCommand(cmd) && o.OperatorID != "" {
 		if err := verifyOperatorID(o.Context, c, o.OperatorID, cmd.OutOrStdout()); err != nil {
 			if o.Force {
 				o.PrintfVerboseErrf(cmd, "%s, use --force option or make sure to use a proper operator id", err.Error())