Panic when invoking `glab` command
Checklist
-
I'm using the latest version of the extension (Run glab --version
)- Extension version:
glab version 1.31.0 (2023-06-28)
- Extension version:
-
Operating system and version: MacOS 13.4
Summary
When running glab
without any parameters after fresh install I get:
glab
GLab is an open source GitLab CLI tool that brings GitLab to your command line.
USAGE
glab <command> <subcommand> [flags]
...
FEEDBACK
Encountered a bug or want to suggest a feature?
Open an issue using 'glab issue create -R gitlab-org/cli'
panic: runtime error: index out of range [0] with length 0
goroutine 1 [running]:
main.main()
gitlab.com/gitlab-org/cli/cmd/glab/main.go:165 +0xc50
Steps to reproduce
Run glab
without extra parameters.
What is the current bug behavior?
Panic and glab
command exiting with non-zero code.
What is the expected correct behavior?
No panic.
Possible fixes
Seems like this part it the culprit: https://gitlab.com/gitlab-org/cli/-/blob/main/cmd/glab/main.go#L163-165