runtime error: invalid memory address or nil pointer dereference signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x142612f
Checklist
-
I'm using the latest version of the extension (Run glab --version
)- Extension version: glab version e166d82d (2023-09-22)
-
Operating system and version: macOS 15 -
Gitlab.com or self-managed instance? gitlab.com -
GitLab version (if self-managed) GitLab version here (Use the version
endpoint, like this: gitlab.my-company.com/api/v4/version) -
I have performed glab auth status
to check for authentication issues
Summary
Steps to reproduce
run bash command: yes n | glab repo create --group topg/subg project
What is the current bug behavior?
panic: runtime error: invalid memory address or nil pointer dereference
What is the expected correct behavior?
create project
in group topg/subg
.
Relevant logs and/or screenshots
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x13f6831]
goroutine 1 [running]:
github.com/AlecAivazis/survey/v2/terminal.(*RuneReader).ReadLineWithDefault.func2(...)
github.com/AlecAivazis/survey/v2@v2.3.6/terminal/runereader.go:65
github.com/AlecAivazis/survey/v2/terminal.(*RuneReader).ReadLineWithDefault(0xc00022cea0, 0x19a000?, {0x2538bc8, 0x0, 0x0}, {0x0?, 0x0?, 0x10b30e0?})
github.com/AlecAivazis/survey/v2@v2.3.6/terminal/runereader.go:328 +0x891
github.com/AlecAivazis/survey/v2/terminal.(*RuneReader).ReadLine(...)
github.com/AlecAivazis/survey/v2@v2.3.6/terminal/runereader.go:37
github.com/AlecAivazis/survey/v2.(*Confirm).getBool(0xc0001dcb00, 0x0, 0xc0001e9388)
github.com/AlecAivazis/survey/v2@v2.3.6/confirm.go:59 +0x186
github.com/AlecAivazis/survey/v2.(*Confirm).Prompt(0xc0001dcb00, 0xc0001e9388)
github.com/AlecAivazis/survey/v2@v2.3.6/confirm.go:136 +0xf6
github.com/AlecAivazis/survey/v2.Ask({0xc0007bf990, 0x1, 0x100c0002a5bd8?}, {0x1a79a60?, 0xc00002908e}, {0x0, 0x0, 0xc000100000?})
github.com/AlecAivazis/survey/v2@v2.3.6/survey.go:354 +0x38f
github.com/AlecAivazis/survey/v2.AskOne(...)
github.com/AlecAivazis/survey/v2@v2.3.6/survey.go:271
gitlab.com/gitlab-org/cli/pkg/prompt.glob..func1(0x1c093c7?, {0x1c8bfba, 0x2e}, 0x1)
gitlab.com/gitlab-org/cli/pkg/prompt/prompt.go:89 +0xf7
gitlab.com/gitlab-org/cli/commands/project/create.initGit({0x0, 0x0})
gitlab.com/gitlab-org/cli/commands/project/create/project_create.go:216 +0x7b
gitlab.com/gitlab-org/cli/commands/project/create.runCreateProject(0x0?, {0xc00018d0e0, 0x1, 0x3}, 0xc00040b530)
gitlab.com/gitlab-org/cli/commands/project/create/project_create.go:80 +0x12b
gitlab.com/gitlab-org/cli/commands/project/create.NewCmdCreate.func1(0xc000171200?, {0xc00018d0e0?, 0x3?, 0x3?})
gitlab.com/gitlab-org/cli/commands/project/create/project_create.go:30 +0x25
github.com/spf13/cobra.(*Command).execute(0xc000171200, {0xc00018d0b0, 0x3, 0x3})
github.com/spf13/cobra@v1.7.0/command.go:940 +0x862
github.com/spf13/cobra.(*Command).ExecuteC(0xc000344600)
github.com/spf13/cobra@v1.7.0/command.go:1068 +0x3bd
main.main()
gitlab.com/gitlab-org/cli/cmd/glab/main.go:155 +0x9c5
Possible fixes
Edited by Oscar Tovar