Skip to content

panic: runtime error: index out of range [0] with length 0 #17

@halkeye

Description

@halkeye
$ bump minor --allow-dirty
panic: runtime error: index out of range [0] with length 0

goroutine 1 [running]:
github.com/guilhem/bump/pkg/semver.Latest({0x0, 0x0, 0x2?})
 /home/halkeye/go/pkg/mod/github.com/guilhem/bump@v0.2.1/pkg/semver/semver.go:60 +0x186
github.com/guilhem/bump/cmd.preRun(0xe47760, {0x9def6e?, 0x4?, 0x9def72?})
 /home/halkeye/go/pkg/mod/github.com/guilhem/bump@v0.2.1/cmd/root.go:116 +0x29d
github.com/spf13/cobra.(*Command).execute(0xe47760, {0xc000119a30, 0x1, 0x1})
 /home/halkeye/go/pkg/mod/github.com/spf13/cobra@v1.2.1/command.go:835 +0x5c3
github.com/spf13/cobra.(*Command).ExecuteC(0xe47c60)
 /home/halkeye/go/pkg/mod/github.com/spf13/cobra@v1.2.1/command.go:974 +0x38d
github.com/spf13/cobra.(*Command).Execute(...)
 /home/halkeye/go/pkg/mod/github.com/spf13/cobra@v1.2.1/command.go:902
github.com/spf13/cobra.(*Command).ExecuteContext(...)
 /home/halkeye/go/pkg/mod/github.com/spf13/cobra@v1.2.1/command.go:895
github.com/guilhem/bump/cmd.Execute()
 /home/halkeye/go/pkg/mod/github.com/guilhem/bump@v0.2.1/cmd/root.go:63 +0x1f8
main.main()
 /home/halkeye/go/pkg/mod/github.com/guilhem/bump@v0.2.1/main.go:21 +0xf

I think its having trouble with grabbing tags?

$  bump minor --allow-dirty --latest-tag=false
Use the arrow keys to navigate: ↓ ↑ → ←
? Select Previous tag:

No results

Though there are tags

$  git tag
v0.1.0
v0.2.0

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions