Forjj segfault if no Forjfile
Created by: uggla
Forjj is SIGSEGV if there in no Forjfile. I think it should not crash, and just report that Forjfile is missing.
uggla@ugglalaptop src]$ forjj create
branch master, build_date 2018-07-21_22:58:28_+0200, build_commit ebbca899263e4918ed70353f51cefc902e69f10b, build_tag false.
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x7d6dba]
goroutine 1 [running]:
forjj/forjfile.(*Forge).GetDeployments(...)
/go/src/forjj/forjfile/forge.go:921
main.(*Forj).ParseContext(0xb897c0, 0xc4200ec900, 0x0, 0x0, 0xc42015a000, 0xb83bf0, 0xc4200a3ee0)
/go/src/forjj/cli_context.go:93 +0x49a
main.(*Forj).ParseContext-fm(0xc4200ec900, 0x0, 0x0, 0x0, 0x0, 0x0)
/go/src/forjj/app.go:228 +0x48
forjj/vendor/github.com/forj-oss/forjj-modules/cli.(*ForjCli).contextHook(0xc4200ec900, 0x0, 0x0, 0xc42000c4a0, 0x0, 0x0)
/go/src/forjj/vendor/github.com/forj-oss/forjj-modules/cli/forjj-context.go:151 +0x34d
forjj/vendor/github.com/forj-oss/forjj-modules/cli.(*ForjCli).loadContext(0xc4200ec900, 0xc42009a010, 0x1, 0x1, 0x0, 0x0, 0x8fbcc3, 0x7)
/go/src/forjj/vendor/github.com/forj-oss/forjj-modules/cli/forjj-context.go:58 +0x1b2
forjj/vendor/github.com/forj-oss/forjj-modules/cli.(*ForjCli).Parse(0xc4200ec900, 0xc42009a010, 0x1, 0x1, 0x0, 0x0, 0xc4200a1560, 0xc420043f30, 0x76ab14, 0x8744e0)
/go/src/forjj/vendor/github.com/forj-oss/forjj-modules/cli/forj-cli.go:69 +0x6e
main.main()
/go/src/forjj/forjj.go:35 +0xdd
[uggla@ugglalaptop src]$