Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

primary-ip list -o json causes crash #401

Closed
emrul opened this issue Aug 6, 2022 · 1 comment · Fixed by #403
Closed

primary-ip list -o json causes crash #401

emrul opened this issue Aug 6, 2022 · 1 comment · Fixed by #403

Comments

@emrul
Copy link

emrul commented Aug 6, 2022

I am using the latest release, v1.30.1 and this is my output:

❯ hcloud primary-ip list -o json
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x149299d]

goroutine 1 [running]:
github.com/hetznercloud/cli/internal/cmd/base.(*ListCmd).Run(0x1a81080, {0x1705e08, 0xc0000b2008}, {0x1709848, 0xc000296a20}, 0x0?)
	/Users/runner/work/cli/cli/internal/cmd/base/list.go:71 +0x17d
github.com/hetznercloud/cli/internal/cmd/base.(*ListCmd).CobraCommand.func1(0xc0003f4c80?, {0xc0003e4b40?, 0x0?, 0x2?})
	/Users/runner/work/cli/cli/internal/cmd/base/list.go:42 +0x33
github.com/spf13/cobra.(*Command).execute(0xc0003f4c80, {0xc0000b6030, 0x2, 0x2})
	/Users/runner/go/pkg/mod/github.com/spf13/cobra@v1.1.3/command.go:852 +0x67c
github.com/spf13/cobra.(*Command).ExecuteC(0xc000125900)
	/Users/runner/go/pkg/mod/github.com/spf13/cobra@v1.1.3/command.go:960 +0x39c
github.com/spf13/cobra.(*Command).Execute(...)
	/Users/runner/go/pkg/mod/github.com/spf13/cobra@v1.1.3/command.go:897
main.main()
	/Users/runner/work/cli/cli/cmd/hcloud/main.go:38 +0x1ea

Note, if I run without -o json it works fine:

❯ hcloud primary-ip list
ID         TYPE   NAME           IP              ASSIGNEE   DNS                                           AUTO DELETE
XXXX   ipv4   primary_ip-1   XXX.XXX.XXX.XXX   -          static.XXXXXXX.clients.your-server.de   no
LKaemmerling added a commit that referenced this issue Aug 8, 2022
Closes #401

Signed-off-by: Lukas Kämmerling <lukas.kaemmerling@hetzner-cloud.de>
@LKaemmerling
Copy link
Member

Hey @emrul,

thank you for the report! We will fix this shortly.

LKaemmerling added a commit that referenced this issue Aug 8, 2022
Closes #401

Signed-off-by: Lukas Kämmerling <lukas.kaemmerling@hetzner-cloud.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants