gitkraken / gk-cli

GitKraken CLI Releases and Documentation
https://www.gitkraken.com
Other
122 stars 48 forks source link

[BUG] Panic when checking the version in Linux #29

Closed thenexxuz closed 9 months ago

thenexxuz commented 9 months ago

Description

Env: Linux

Command: gk version

Error:

panic: interface conversion: interface {} is nil, not version.NewVersionInfo

goroutine 1 [running]:
github.com/gitkraken/cli/pkg/cmd.endVersionCheck(0x254aff8?, {0x252b690, 0xc0001ccbd0}, {0x2526c40, 0xc000070038}, 0x40?)
        /Users/runner/work/cli/cli/pkg/cmd/root_command.go:139 +0x11a
github.com/gitkraken/cli/pkg/cmd.NewCmdRoot.func2(0xc00062e300?, {0x1592f34?, 0x4?, 0x1592ef0?})
        /Users/runner/work/cli/cli/pkg/cmd/root_command.go:56 +0x69
github.com/spf13/cobra.(*Command).execute(0xc00062e300, {0x314a480, 0x0, 0x0})
        /Users/runner/go/pkg/mod/github.com/spf13/cobra@v1.6.1/command.go:936 +0xa22
github.com/spf13/cobra.(*Command).ExecuteC(0xc0006cd200)
        /Users/runner/go/pkg/mod/github.com/spf13/cobra@v1.6.1/command.go:1044 +0x3a5
github.com/spf13/cobra.(*Command).Execute(...)
        /Users/runner/go/pkg/mod/github.com/spf13/cobra@v1.6.1/command.go:968
github.com/spf13/cobra.(*Command).ExecuteContext(0x2526050?, {0x2531388?, 0x314a480?})
        /Users/runner/go/pkg/mod/github.com/spf13/cobra@v1.6.1/command.go:961 +0x47
main.main()
        /Users/runner/work/cli/cli/cmd/gk/main.go:30 +0x12e

image

GitKraken CLI Version

1.2.0

OS Version

EndeavourOS Linux

Git Version

2.43.0

Logs, Screenshots, Screen Captures, URLs, etc

No response

thenexxuz commented 9 months ago

Seemed that this was a false positive... I ran the version command within the same terminal after updating but after restarting my terminal, the error has gone away.

sergiolms commented 9 months ago

Hi @thenexxuz, Glad to hear you solved the issue. I spotted why this message may be appearing, so I'll address this to avoid it in the future. Thanks for your help!