segmentation violation: glab ci get immediately SIGSEGVs
Checklist
-
I'm using the latest version of the extension (Run glab --version
)- Extension version: Put your extension version here
-
Operating system and version: macos 14.3.1 (23D60) -
Gitlab.com or self-managed instance? gitlab.com -
GitLab version (if self-managed) GitLab Enterprise Edition 16.10.0-pre f7f08e9f7a0 -
I have performed glab auth status
to check for authentication issues
Summary
$ glab ci get
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x0 pc=0x102a40ad4]
goroutine 1 [running]:
gitlab.com/gitlab-org/cli/commands/ci/get.NewCmdGet.func1(0x14000636400?, {0x103b18de0?, 0x4?, 0x102d54ff1?})
gitlab.com/gitlab-org/cli/commands/ci/get/get.go:66 +0x104
github.com/spf13/cobra.(*Command).execute(0x14000635200, {0x103b18de0, 0x0, 0x0})
github.com/spf13/cobra@v1.7.0/command.go:940 +0x66c
github.com/spf13/cobra.(*Command).ExecuteC(0x14000355200)
github.com/spf13/cobra@v1.7.0/command.go:1068 +0x320
main.main()
gitlab.com/gitlab-org/cli/cmd/glab/main.go:155 +0x930
$ glab version
glab version 1.36.0 (2023-12-12)
Environment
- OS: Darwin 23.3.0 arm64
- SHELL: /bin/zsh
- TERM: xterm-256color
- GLAB: glab version 1.36.0 (2023-12-12)
Steps to reproduce
Run glab ci get
What is the current bug behavior?
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x0 pc=0x102a40ad4]
What is the expected correct behavior?
Not a panic.
Relevant logs and/or screenshots
See above.
Possible fixes
Don't dereference a nil pointer!
Edited by Andrew Newdigate