lab icon indicating copy to clipboard operation
lab copied to clipboard

lab issue command fails with a panic for not assigned issues

Open mschaaf opened this issue 4 years ago • 1 comments

e.g I ran in a repository lab issue 1158 and the command returns the issue details, but if I ran lab issue 1159 the command panics out. The difference is that the last is not assigned. If I assign my self to issue 1159 the command returns the details.

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x771e18]

goroutine 1 [running]:
github.com/lighttiger2505/lab/commands/issue.issueDetailOutput(0xc4201b8000, 0x488, 0xc420182180)
        /home/travis/gopath/src/github.com/lighttiger2505/lab/commands/issue/detail.go:89 +0x588
github.com/lighttiger2505/lab/commands/issue.(*detailMethod).Process(0xc4201a2040, 0xc42011ac40, 0xc4200344e0, 0xc420136200, 0xc420028a35)
        /home/travis/gopath/src/github.com/lighttiger2505/lab/commands/issue/detail.go:26 +0x84
github.com/lighttiger2505/lab/commands/issue.(*IssueCommand).Run(0xc42014c4b0, 0xc42001c0b0, 0x1, 0x1, 0xc42011a600)
        /home/travis/gopath/src/github.com/lighttiger2505/lab/commands/issue/issue.go:68 +0x1fa
github.com/lighttiger2505/lab/vendor/github.com/mitchellh/cli.(*CLI).Run(0xc4200ea500, 0xc42001de90, 0x8db2a8, 0x9)
        /home/travis/gopath/src/github.com/lighttiger2505/lab/vendor/github.com/mitchellh/cli/cli.go:255 +0x1eb
main.realMain(0x9268e0, 0xc42000c018, 0x9235ac, 0x6, 0x923910, 0x7, 0xc42002e0b8)
        /home/travis/gopath/src/github.com/lighttiger2505/lab/main.go:176 +0xf90
main.main()
        /home/travis/gopath/src/github.com/lighttiger2505/lab/main.go:39 +0x69

lab version: ver: v0.6.3 rev: 781b5e3

mschaaf avatar Sep 20 '19 06:09 mschaaf

Thanks. The problem has been reproduced.

lighttiger2505 avatar Sep 20 '19 17:09 lighttiger2505