Skip to content

Commit

Permalink
Merge pull request #12 from coherenceplatform/aa/cocliv1
Browse files Browse the repository at this point in the history
cocli v1.0.2 - cnc command improvements
  • Loading branch information
zach-withcoherence authored Jun 11, 2024
2 parents 794dbe2 + 2f78bf1 commit d21abb6
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
12 changes: 8 additions & 4 deletions cmd/cocli/cnc.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,19 @@ var cncCmd = &cobra.Command{
panic(err)
}

// Build the command with the new argument structure
commandArgs := []string{"-e", outputFile, "-f", outputFile}
commandArgs = append(commandArgs, args...)
env := os.Environ()
env = append(
env,
fmt.Sprintf("CNC_CONFIG_PATH=%s", outputFile),
fmt.Sprintf("CNC_ENVIRONMENTS_PATH=%s", outputFile),
)

// Run a shell command using the arguments passed to the Cobra command
cmdExec := exec.Command("cnc", commandArgs...)
cmdExec := exec.Command("cnc", args...)
cmdExec.Stdin = os.Stdin
cmdExec.Stdout = os.Stdout
cmdExec.Stderr = os.Stderr
cmdExec.Env = env

if err := cmdExec.Run(); err != nil {
fmt.Printf("Error running command: %v\n", err)
Expand Down
2 changes: 1 addition & 1 deletion cocli_version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.1
1.0.2
2 changes: 1 addition & 1 deletion pkg/cocli/cocli.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ var prodConfig = &CocliConfig{
CoherenceDomain: "https://beta.withcoherence.com",
}

const cliVersion = "1.0.1"
const cliVersion = "1.0.2"

func GetCliConfig() CocliConfig {
if strings.ToLower(os.Getenv("COHERENCE_ENVIRONMENT")) == "review" {
Expand Down

0 comments on commit d21abb6

Please sign in to comment.