You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(populating the shell variables with real things, obviously)
It results in:
panic: assignment to entry in nil map
goroutine 1 [running]:
github.com/uselagoon/lagoon-cli/cmd.glob..func7(0xc00015e700?, {0x9c1242?, 0x4?, 0x9c11ee?})
/go/src/github.com/uselagoon/lagoon-cli/cmd/config.go:169 +0x249
github.com/spf13/cobra.(*Command).execute(0xde7840, {0xc00013a580, 0xb, 0xb})
/go/pkg/mod/github.com/spf13/[email protected]/command.go:983 +0xabc
github.com/spf13/cobra.(*Command).ExecuteC(0xdeba60)
/go/pkg/mod/github.com/spf13/[email protected]/command.go:1115 +0x3ff
github.com/spf13/cobra.(*Command).Execute(...)
/go/pkg/mod/github.com/spf13/[email protected]/command.go:1039
github.com/uselagoon/lagoon-cli/cmd.Execute()
/go/src/github.com/uselagoon/lagoon-cli/cmd/root.go:113 +0x1a
main.main()
/go/src/github.com/uselagoon/lagoon-cli/main.go:8 +0xf
+ /lagoon config default --lagoon XXXX
Chosen context 'XXXX' doesn't exist in config file55 <nil>
+ /lagoon version
lagoon v0.21.1 (go1.21.8)
built 2024-03-22T03:36:21+0000
+ /lagoon config list
NAME VERSION GRAPHQL SSH-HOSTNAME SSH-PORT SSH-KEY
+ /lagoon login
Chosen context 'amazeeio' doesn't exist in config file
+ /lagoon whoami
Expected behavior
A config entry added to ~/.lagoon.yml
Additional context
As it turns out, the error is caused by the presence of a blank ~/.lagoon.yml in the container.
Simply removing the empty config file before attempting to add a config prevents the error, and is what we're currently using as a workaround.
The text was updated successfully, but these errors were encountered:
dale-c-anderson
changed the title
Using /lagoon config add in the docker image produces a panic error
Using /lagoon config add with an empty ~/.lagoon.yml file produces a panic error
Jul 3, 2024
Describe the bug
While using the
uselagoon/lagoon-cli
image in a gitlab CI job, we encounter the following error when trying to configure the cli:This appears to happen all the way from
v0.18.0
up until the currentv0.21.1
To Reproduce
In the container, run
(populating the shell variables with real things, obviously)
It results in:
Expected behavior
A config entry added to ~/.lagoon.yml
Additional context
As it turns out, the error is caused by the presence of a blank
~/.lagoon.yml
in the container.Simply removing the empty config file before attempting to add a config prevents the error, and is what we're currently using as a workaround.
The text was updated successfully, but these errors were encountered: