`glab issue view 1` crashes when exiting pager
Checklist
-
I'm using the latest version of the extension (Run glab --version)- Extension version: noticed on
glab version 1.31.0, but can reproduce on the latestgo install
- Extension version: noticed on
-
Operating system and version: 5.15.90.1-microsoft-standard-WSL -
Gitlab.com or self-managed instance? self-managed instance -
GitLab version (if self-managed) {"version":"12.3.1","revision":"3440d0f6100"} (Use the versionendpoint, like this: -
I have performed glab auth statusto check for authentication issues
Summary
When exiting the pager after a glab view issue glab cli crashes.
Steps to reproduce
Run glab issue view 1
Press q to observe the below error:
What is the current bug behavior?
❯ glab issue view 1
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xe2c503]
goroutine 1 [running]:
gitlab.com/gitlab-org/cli/commands/issuable/view.printTTYIssuePreview(0xc0002207c0)
/home/bferdinandy/go/pkg/mod/gitlab.com/gitlab-org/cli@v1.31.1-0.20230801030008-5eae216f6a29/commands/issuable/view/issuable_view.go:217 +0x9e3
gitlab.com/gitlab-org/cli/commands/issuable/view.NewCmdView.func1(0xc0001d9800?, {0xc0006933e0, 0x1, 0x1?})
/home/bferdinandy/go/pkg/mod/gitlab.com/gitlab-org/cli@v1.31.1-0.20230801030008-5eae216f6a29/commands/issuable/view/issuable_view.go:113 +0x505
github.com/spf13/cobra.(*Command).execute(0xc0001d9800, {0xc0006933c0, 0x1, 0x1})
/home/bferdinandy/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:940 +0x862
github.com/spf13/cobra.(*Command).ExecuteC(0xc0004fa000)
/home/bferdinandy/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:1068 +0x3bd
main.main()
/home/bferdinandy/go/pkg/mod/gitlab.com/gitlab-org/cli@v1.31.1-0.20230801030008-5eae216f6a29/cmd/glab/main.go:155 +0x9e5
Edited by Bence Ferdinandy
