semaphoreci / cli

Semaphore 2.0 Command Line Interface
Apache License 2.0
27 stars 13 forks source link

`sem create project aName` crashes #72

Closed mactsouk closed 6 years ago

mactsouk commented 6 years ago
$ sem create project aName
error: Failed to read from resource file.
panic: interface conversion: interface {} is nil, not string

goroutine 1 [running]:
github.com/semaphoreci/cli/cmd.glob..func7(0x1808be0, 0xc000092980, 0x2, 0x2)
    /home/semaphore/cli/cmd/create.go:37 +0x83a
github.com/spf13/cobra.(*Command).execute(0x1808be0, 0xc000092900, 0x2, 0x2, 0x1808be0, 0xc000092900)
    /home/semaphore/go/pkg/mod/github.com/spf13/cobra@v0.0.3/command.go:766 +0x2cc
github.com/spf13/cobra.(*Command).ExecuteC(0x180bb60, 0x180bdc0, 0xc000111f50, 0x13c76ae)
    /home/semaphore/go/pkg/mod/github.com/spf13/cobra@v0.0.3/command.go:852 +0x2fd
github.com/spf13/cobra.(*Command).Execute(0x180bb60, 0x1005380, 0xc00006c058)
    /home/semaphore/go/pkg/mod/github.com/spf13/cobra@v0.0.3/command.go:800 +0x2b
github.com/semaphoreci/cli/cmd.Execute()
    /home/semaphore/cli/cmd/root.go:37 +0x2d
main.main()
    /home/semaphore/cli/main.go:6 +0x20
$ sem version
v0.7.5
shiroyasha commented 6 years ago

The panic has been fixed. The message needs to be improved.