rykov / paperboy

💌💨 Email Campaign Delivery built with GoLang inspired by GoHugo
https://www.paperboy.email/
496 stars 28 forks source link

paperboy init panics at afero.Exists() #12

Closed christophberger closed 4 years ago

christophberger commented 6 years ago

After a fresh compile of paperboy, I cd'ed into an empty directory and called

paperboy init

and got a SIGSEV immediately:

~/D/P/test> paperboy init
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x147ec2b]

goroutine 1 [running]:
github.com/rykov/paperboy/mail.(*fs).Stat(0x0, 0xc4202bc640, 0x36, 0x114732f, 0xc42019dca0, 0x2, 0x2)
    <autogenerated>:1 +0x2b
github.com/rykov/paperboy/vendor/github.com/spf13/afero.Exists(0x18cb540, 0x0, 0xc4202bc640, 0x36, 0x36, 0x0, 0xc4202d9680)
    /Users/christoph/go/src/github.com/rykov/paperboy/vendor/github.com/spf13/afero/util.go:313 +0x49
github.com/rykov/paperboy/cmd.glob..func3(0xc4200cb440, 0x1928908, 0x0, 0x0, 0x0, 0x0)
    /Users/christoph/go/src/github.com/rykov/paperboy/cmd/new.go:125 +0x113
github.com/rykov/paperboy/vendor/github.com/spf13/cobra.(*Command).execute(0xc4200cb440, 0x1928908, 0x0, 0x0, 0xc4200cb440, 0x1928908)
    /Users/christoph/go/src/github.com/rykov/paperboy/vendor/github.com/spf13/cobra/command.go:649 +0x456
github.com/rykov/paperboy/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0x19000e0, 0xc42019df40, 0x1900228, 0xc42019df08)
    /Users/christoph/go/src/github.com/rykov/paperboy/vendor/github.com/spf13/cobra/command.go:728 +0x2fe
github.com/rykov/paperboy/vendor/github.com/spf13/cobra.(*Command).Execute(0x19000e0, 0xc42019df08, 0x1)
    /Users/christoph/go/src/github.com/rykov/paperboy/vendor/github.com/spf13/cobra/command.go:687 +0x2b
github.com/rykov/paperboy/cmd.Execute(0x1654640, 0x1b, 0x15dcb9e, 0x3)
    /Users/christoph/go/src/github.com/rykov/paperboy/cmd/root.go:33 +0x1bd
main.main()
    /Users/christoph/go/src/github.com/rykov/paperboy/main.go:28 +0x51
2 ~/D/P/test>

I had a prior version of paperboy around for quite a while but I cannot remember if I ever found the time to test it. So I cannot confirm whether paperboy ever worked on my machine.

rykov commented 4 years ago

Please try building master instead of using the release. We will release a new version soon.