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

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


The following commit(s) were added to refs/heads/main by this push:
     new 05b9982d4 fix(cli): don't verify operator
05b9982d4 is described below

commit 05b9982d43b8a00df9631acf909f77f7b80d9a28
Author: Pasquale Congiusti <pasquale.congiu...@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 5c12bb281..b5746529a 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())

Reply via email to