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

Display proper error message when shift cannot find shift.json #32

Open
sparshadotel opened this issue Oct 31, 2019 · 0 comments
Open

Comments

@sparshadotel
Copy link
Contributor

Commands:

shift-cli add env
shift deploy dev

Debug Output

panic: Error reading file.: open /tmp/shift.json: no such file or directory

goroutine 1 [running]:
github.com/leapfrogtechnology/shift/core/services/storage.failOnError(...)
	/home/sparsha/go/src/github.com/leapfrogtechnology/shift/core/services/storage/storage.go:14
github.com/leapfrogtechnology/shift/core/services/storage.Read(0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
	/home/sparsha/go/src/github.com/leapfrogtechnology/shift/core/services/storage/storage.go:24 +0x23b
github.com/leapfrogtechnology/shift/cli/internals/env.Run()
	/home/sparsha/go/src/github.com/leapfrogtechnology/shift/cli/internals/env/env.go:26 +0x37
github.com/leapfrogtechnology/shift/cli/cmd.AddEnv(...)
	/home/sparsha/go/src/github.com/leapfrogtechnology/shift/cli/cmd/env.go:9
github.com/leapfrogtechnology/shift/cli/cmd.Initialize.func4(0xc0000b86e0, 0x0, 0xc0001eebd0)
	/home/sparsha/go/src/github.com/leapfrogtechnology/shift/cli/cmd/cmd.go:57 +0x21
github.com/urfave/cli.HandleAction(0xa8f4c0, 0xbac578, 0xc0000b86e0, 0xc0000b86e0, 0x0)
	/home/sparsha/go/src/github.com/urfave/cli/app.go:523 +0xbe
github.com/urfave/cli.Command.Run(0xb78136, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
	/home/sparsha/go/src/github.com/urfave/cli/command.go:174 +0x521
github.com/urfave/cli.(*App).RunAsSubcommand(0xc00022a380, 0xc0000b8420, 0x0, 0x0)
	/home/sparsha/go/src/github.com/urfave/cli/app.go:404 +0x889
github.com/urfave/cli.Command.startApp(0xb780be, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
	/home/sparsha/go/src/github.com/urfave/cli/command.go:329 +0x84f
github.com/urfave/cli.Command.Run(0xb780be, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
	/home/sparsha/go/src/github.com/urfave/cli/command.go:102 +0x9c4
github.com/urfave/cli.(*App).Run(0xc00022a1c0, 0xc0000b2040, 0x4, 0x4, 0x0, 0x0)
	/home/sparsha/go/src/github.com/urfave/cli/app.go:276 +0x71c
github.com/leapfrogtechnology/shift/cli/cmd.Initialize(0xc000215f58, 0xbac4f8, 0x0)
	/home/sparsha/go/src/github.com/leapfrogtechnology/shift/cli/cmd/cmd.go:66 +0x20b
main.main()
	/home/sparsha/go/src/github.com/leapfrogtechnology/shift/shift.go:17 +0x8e

Expected Behaviour

shift.json is not present in this directory.
Please add shift.json or initialize with shift-cli setup
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