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

nil-pointer error when adding service-registry artifact role #1135

Closed
craicoverflow opened this issue Sep 24, 2021 · 0 comments · Fixed by #1137
Closed

nil-pointer error when adding service-registry artifact role #1135

craicoverflow opened this issue Sep 24, 2021 · 0 comments · Fixed by #1137
Assignees
Labels
bug Something isn't working needs-triage

Comments

@craicoverflow
Copy link
Contributor

Description

Version: dev

When adding a role to a service-registry, if I do not provide the role value then I get a nil-pointer error.

Steps to reproduce

$ rhoas service-registry role add --username ephelan_kafka_devexp
Updating role for principal
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xad221b]

goroutine 1 [running]:
github.com/redhat-developer/app-services-cli/pkg/cmd/registry/artifact/role/add.runAdd(0xc0000e0a00, 0xc0000bdd90, 0x0)
        /home/ephelan/code/github.com/redhat-developer/app-services-cli/pkg/cmd/registry/artifact/role/add/add.go:126 +0x2bb
github.com/redhat-developer/app-services-cli/pkg/cmd/registry/artifact/role/add.NewAddCommand.func1(0xc0000dd180, 0xc000557840, 0x0, 0x2, 0x0, 0x0)
        /home/ephelan/code/github.com/redhat-developer/app-services-cli/pkg/cmd/registry/artifact/role/add/add.go:93 +0xe5
github.com/spf13/cobra.(*Command).execute(0xc0000dd180, 0xc000557820, 0x2, 0x2, 0xc0000dd180, 0xc000557820)
        /home/ephelan/.gvm/pkgsets/go1.16.4/global/pkg/mod/github.com/spf13/[email protected]/command.go:856 +0x472
github.com/spf13/cobra.(*Command).ExecuteC(0xc000369680, 0x2013038, 0x3, 0xc000369680)
        /home/ephelan/.gvm/pkgsets/go1.16.4/global/pkg/mod/github.com/spf13/[email protected]/command.go:974 +0x375
github.com/spf13/cobra.(*Command).Execute(...)
        /home/ephelan/.gvm/pkgsets/go1.16.4/global/pkg/mod/github.com/spf13/[email protected]/command.go:902
main.main()
        /home/ephelan/code/github.com/redhat-developer/app-services-cli/cmd/rhoas/main.go:52 +0x2aa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs-triage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants