confluent-cli icon indicating copy to clipboard operation
confluent-cli copied to clipboard

Error changing environments

Open andybryant opened this issue 3 years ago • 0 comments

On the latest version of confluent-cli I get the following error attempting the change environments

(env ids obfuscated in following output)

> confluent environment use env-11111
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x57ff9e7]

goroutine 1 [running]:
github.com/confluentinc/cli/internal/cmd/environment.(*command).use(0xc000594558, 0x20?, {0xc0003a9c70?, 0xc000738c60?, 0x0?})
	go/src/github.com/confluentinc/cli/internal/cmd/environment/command_use.go:36 +0xe7
github.com/confluentinc/cli/internal/pkg/cmd.Chain.func1(0xc00040caf0?, {0xc0003a9c70, 0x1, 0x1})
	go/src/github.com/confluentinc/cli/internal/pkg/cmd/cobra.go:24 +0x7f
github.com/confluentinc/cli/internal/pkg/cmd.CatchErrors.func1(0xc00014b680, {0xc0003a9c70, 0x1, 0x1})
	go/src/github.com/confluentinc/cli/internal/pkg/cmd/cobra.go:12 +0x69
github.com/spf13/cobra.(*Command).execute(0xc00014b680, {0xc0003a9c50, 0x1, 0x1})
	go/1.19.0/pkg/mod/github.com/spf13/[email protected]/command.go:872 +0x694
github.com/spf13/cobra.(*Command).ExecuteC(0xc0005a0000)
	go/1.19.0/pkg/mod/github.com/spf13/[email protected]/command.go:990 +0x3bd
github.com/spf13/cobra.(*Command).Execute(...)
	go/1.19.0/pkg/mod/github.com/spf13/[email protected]/command.go:918
github.com/confluentinc/cli/internal/cmd.Execute(0xc0005a0000, {0xc000052090?, 0x6694e90?, 0x8?}, 0xc00027e090)
	go/src/github.com/confluentinc/cli/internal/cmd/command.go:148 +0x1eb
main.main()
	go/src/github.com/confluentinc/cli/cmd/confluent/main.go:37 +0x28a

Other commands work ok...

> confluent version
confluent - Confluent CLI

Version:     v2.31.0
Git Ref:     26b14515
Build Date:  2022-10-27T23:12:39Z
Go Version:  go1.19 (darwin/amd64)
Development: false
> confluent environment list
      ID      |  Name
--------------+----------
    env-11111 | dev
    env-33333 | sandbox
    env-44444 | prod
    env-22222 | tst

Running on a MacBookPro 16" 2019 2.6 GHz 6-Core Intel Core i7 on macOS 12.6

andybryant avatar Nov 01 '22 21:11 andybryant