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

Fix parsing of CLI flags when using stdIn invocation. #89

Closed bhamail closed 4 years ago

bhamail commented 4 years ago

Support passing in CLI flags when invoking Nancy using the standard-input pipe approach.

e.g.

go list -m all |  ./nancy -quiet

Fixes Issue #88

cc @bhamail / @DarthHater

DarthHater commented 4 years ago

@zendern you mind taking a gander here? The config stuff was largely your ball court, I think you'll have the best eye!

zendern commented 4 years ago

@bhamail @DarthHater Found it and my bad!! 😢 https://godoc.org/github.com/stretchr/testify/assert#ObjectsAreEqual

Apparently this does no assertion. Working on trying to switch it over to an method that does an assert but having issues with the logurus formatters since they are pointers.

zendern commented 4 years ago

Now you should see a failing test for the standard in and quiet scenario in 38f8e29. Had to fiddle all the formatters.

bhamail commented 4 years ago

Excellent. I'm off and running again. Thanks @zendern !