Package: gh
Version: 2.46.0-4
Severity: grave
X-Debbugs-Cc: [email protected]

I used `gh pr checkout https://github.com/myorg/myrepo/pull/90`, and got
this:

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

goroutine 1 [running]:
github.com/cli/cli/v2/pkg/cmd/pr/checkout.checkoutRun(0xc000696380)
        github.com/cli/cli/v2/pkg/cmd/pr/checkout/checkout.go:136 +0x777
github.com/cli/cli/v2/pkg/cmd/pr/checkout.NewCmdCheckout.func1(0xc000819808?, 
{0xc0006ef460, 0x1, 0x12e9718?})
        github.com/cli/cli/v2/pkg/cmd/pr/checkout/checkout.go:61 +0x274
github.com/spf13/cobra.(*Command).execute(0xc000819808, {0xc0006ef440, 0x1, 
0x1})
        github.com/spf13/cobra/command.go:1015 +0xaaa
github.com/spf13/cobra.(*Command).ExecuteC(0xc0004b2f08)
        github.com/spf13/cobra/command.go:1148 +0x46f
github.com/spf13/cobra.(*Command).ExecuteContextC(...)
        github.com/spf13/cobra/command.go:1080
main.mainRun()
        github.com/cli/cli/v2/cmd/gh/main.go:119 +0x53b
main.main()
        github.com/cli/cli/v2/cmd/gh/main.go:46 +0x13

Repeating it gave the same issue. 

Dropping the URL and just doing `gh pr checkout 90` worked.


-- System Information:
Debian Release: forky/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: arm64

Kernel: Linux 7.1.4+deb14-amd64 (SMP w/12 CPU threads; PREEMPT)
Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages gh depends on:
ii  libc6  2.42-17

gh recommends no packages.

gh suggests no packages.

-- no debconf information

Reply via email to