Closed AndreyMZ closed 4 years ago
Interesting. I am a cat
abuser so I've definitely not run into this. I'll take a look. Why are you putting it in a file rather than just piping the command (trying to understand the use case)?
Looks like it's probably related to:
if (fi.Mode() & os.ModeNamedPipe) == 0 {
flag.Usage()
os.Exit(1)
}
in main.go, basically it's checking for pipe, not a redirect like you've done.
Why are you putting it in a file rather than just piping the command (trying to understand the use case)?
go-list.txt
before running nancy
.go-list.txt
artifact for the future.Not a solution, but maybe a workaround: pipe the text file into nancy
:
go list -m all > go-list.txt
cat go-list.txt | nancy
Steps to reproduce
Try variant 1:
Try variant 2:
Actual result
The variant 1 works OK, variant 2 does not work (prints the usage):
Expected result
Both variants work identically.
cc @bhamail / @DarthHater