sonatype-nexus-community / nancy

A tool to check for vulnerabilities in your Golang dependencies, powered by Sonatype OSS Index
Apache License 2.0
564 stars 74 forks source link

panic when passing -q flag #100

Closed zikaeroh closed 4 years ago

zikaeroh commented 4 years ago

I mistakenly tried to use -q instead of -quiet (forgetting the usage). Instead of being told of the bad flag, nancy instead panicked.

panic: runtime error: slice bounds out of range [:5] with length 2

goroutine 1 [running]:
github.com/sonatype-nexus-community/nancy/logger.init.0()
    /home/jake/go/pkg/mod/github.com/sonatype-nexus-community/nancy@v0.1.11/logger/logger.go:35 +0x1c5

Forgive my deletion of the template; it seemed like a feature request template whereas this is a bug.

I'm on v0.1.11.

cc @bhamail / @DarthHater

DarthHater commented 4 years ago

I saw something related to this yesterday and I THINK it's actually from some work I did for logging @bhamail , if that helps!