Skip to content

nil pointer since 0.18.0 #562

@damoon

Description

@damoon

After updating from 0.17.2 to 0.18.0 creating a merge request triggers a nil pointer.

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xe85f3a]
goroutine 1 [running]:
github.com/spf13/viper.(*Viper).find(0x0, 0xc000471a60, 0xd, 0x1, 0xc000471a60, 0xd)
	/home/travis/gopath/pkg/mod/github.com/spf13/[email protected]/viper.go:1027 +0x3a
github.com/spf13/viper.(*Viper).Get(0x0, 0xc000471a60, 0xd, 0x2, 0x2)
	/home/travis/gopath/pkg/mod/github.com/spf13/[email protected]/viper.go:728 +0x85
github.com/spf13/viper.(*Viper).GetStringSlice(0x0, 0xc000471a60, 0xd, 0x10cc4ed, 0x5, 0xc000471a60)
	/home/travis/gopath/pkg/mod/github.com/spf13/[email protected]/viper.go:865 +0x3f
github.com/zaquestion/lab/cmd.flagConfig.func1(0xc0004c7b80)
	/home/travis/gopath/src/github.com/zaquestion/lab/cmd/util.go:45 +0x48b
github.com/spf13/pflag.(*FlagSet).VisitAll(0xc000660700, 0x11c37a0)
	/home/travis/gopath/pkg/mod/github.com/spf13/[email protected]/flag.go:290 +0x94
github.com/zaquestion/lab/cmd.flagConfig(0xc000660700)
	/home/travis/gopath/src/github.com/zaquestion/lab/cmd/util.go:31 +0x37
github.com/zaquestion/lab/cmd.LabPersistentPreRun(0x18c0280, 0xc0006756a0, 0x0, 0x2)
	/home/travis/gopath/src/github.com/zaquestion/lab/cmd/util.go:341 +0x39
github.com/spf13/cobra.(*Command).execute(0x18c0280, 0xc000675680, 0x2, 0x2, 0x18c0280, 0xc000675680)
	/home/travis/gopath/pkg/mod/github.com/spf13/[email protected]/command.go:834 +0x231
github.com/spf13/cobra.(*Command).ExecuteC(0x18bb120, 0xc0000320a0, 0x5, 0x5)
	/home/travis/gopath/pkg/mod/github.com/spf13/[email protected]/command.go:958 +0x375
github.com/spf13/cobra.(*Command).Execute(...)
	/home/travis/gopath/pkg/mod/github.com/spf13/[email protected]/command.go:895
github.com/zaquestion/lab/cmd.Execute()
	/home/travis/gopath/src/github.com/zaquestion/lab/cmd/root.go:222 +0x196
main.main()
	/home/travis/gopath/src/github.com/zaquestion/lab/main.go:28 +0x93

Metadata

Metadata

Assignees

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions