tmrts / boilr

:zap: boilerplate template manager that generates files or directories from template repositories
Apache License 2.0
1.73k stars 119 forks source link

signal SIGSEGV: segmentation violation #51

Open schmunk42 opened 7 years ago

schmunk42 commented 7 years ago

On a Docker image with Debian 8 and boilr 0.3.0

Example command:

docker run dmstr/roj:0.3.0-beta3 boilr version
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x30 pc=0x4596c2]

goroutine 1 [running]:
panic(0x8290c0, 0xc42000e050)
    /home/travis/.gimme/versions/go1.7.linux.amd64/src/runtime/panic.go:500 +0x1a1
github.com/tmrts/boilr/pkg/cmd.GetStringFlag(0xad3720, 0x8a86d0, 0x9, 0xaf37d8, 0x0)
    /home/travis/gopath/src/github.com/tmrts/boilr/pkg/cmd/flags.go:12 +0x52
github.com/tmrts/boilr/pkg/cmd.glob..func10(0xad3720, 0xaf37d8, 0x0, 0x0)
    /home/travis/gopath/src/github.com/tmrts/boilr/pkg/cmd/version.go:18 +0x55
github.com/spf13/cobra.(*Command).execute(0xad3720, 0xaf37d8, 0x0, 0x0, 0xad3720, 0xaf37d8)
    /home/travis/gopath/src/github.com/spf13/cobra/command.go:648 +0x443
github.com/spf13/cobra.(*Command).ExecuteC(0xad21e0, 0xc4200a9f00, 0x2f, 0xc4201136fa)
    /home/travis/gopath/src/github.com/spf13/cobra/command.go:735 +0x367
github.com/spf13/cobra.(*Command).Execute(0xad21e0, 0xc4200a9ef8, 0x1)
    /home/travis/gopath/src/github.com/spf13/cobra/command.go:693 +0x2b
github.com/tmrts/boilr/pkg/cmd.Run()
    /home/travis/gopath/src/github.com/tmrts/boilr/pkg/cmd/root.go:52 +0x6c8
main.main()
    /home/travis/gopath/src/github.com/tmrts/boilr/boilr.go:6 +0x14

Version 0.2.0 of boilr works fine

docker run dmstr/roj:0.2.6 boilr version

Outputs

[...]
[i] Current version is 0.2.0

Note: roj version only coincidentally are the same as boilr