Skip to content

Commit

Permalink
Allow disabling the cli when running in the coherence-operator (#132)
Browse files Browse the repository at this point in the history
  • Loading branch information
tmiddlet2666 authored Oct 24, 2023
1 parent 031203f commit 0e6c4cd
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion cohctl/main.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
/*
* Copyright (c) 2021, Oracle and/or its affiliates.
* Copyright (c) 2021, 2023 Oracle and/or its affiliates.
* Licensed under the Universal Permissive License v 1.0 as shown at
* https://oss.oracle.com/licenses/upl.
*/

package main

import (
"fmt"
"github.com/oracle/coherence-cli/pkg/cmd"
"os"
)

var (
Expand All @@ -21,5 +23,9 @@ var (

// main is the main entry point to Coherence CLI
func main() {
if os.Getenv("CLI_DISABLED") != "" {
fmt.Println("cohctl has been disabled from running in the Coherence Operator")
return
}
cmd.Execute(Version, Date, Commit)
}

0 comments on commit 0e6c4cd

Please sign in to comment.