Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Panic with invalid configuration file #56

Open
vflaux opened this issue Jun 4, 2020 · 0 comments
Open

Panic with invalid configuration file #56

vflaux opened this issue Jun 4, 2020 · 0 comments

Comments

@vflaux
Copy link
Contributor

vflaux commented Jun 4, 2020

Panic when the configuration file has no "providers".
Encountered this after upgrading osprey from v1 to v2 as the configuration format changed.

Steps to reproduce:

$ > ~/.osprey/config
$ osprey user
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x91363b]

goroutine 1 [running]:
github.com/sky-uk/osprey/client.LoadConfig(0xc0000365c0, 0x1b, 0x8a5627, 0xae4920, 0xc00016b230)
	/home/travis/gopath/src/github.com/sky-uk/osprey/client/config.go:86 +0x1db
github.com/sky-uk/osprey/cmd.user(0x118fc60, 0x11b6a50, 0x0, 0x0)
	/home/travis/gopath/src/github.com/sky-uk/osprey/cmd/user.go:34 +0x4e
github.com/spf13/cobra.(*Command).execute(0x118fc60, 0x11b6a50, 0x0, 0x0, 0x118fc60, 0x11b6a50)
	/home/travis/gopath/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:830 +0x2aa
github.com/spf13/cobra.(*Command).ExecuteC(0x1190b60, 0x43d25a, 0x11437a0, 0xc000000180)
	/home/travis/gopath/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:914 +0x2fb
github.com/spf13/cobra.(*Command).Execute(...)
	/home/travis/gopath/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:864
github.com/sky-uk/osprey/cmd.Execute()
	/home/travis/gopath/src/github.com/sky-uk/osprey/cmd/root.go:16 +0x31
main.main()
	/home/travis/gopath/src/github.com/sky-uk/osprey/main.go:6 +0x20

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant