Closed georgexsh closed 2 years ago
@georgexsh thanks for the report! And your suggestions are indeed correct. I'll check what fits better and prepare the PR.
@georgexsh #792 should solve the issue with lab completion
.
I'm going to close this issue. But in case you see any other problems, please feel free to reopen it or open a new issue!
Many thanks for the report @georgexsh
@bmeneg the fix works, thanks! but I still wonder why the logs would be writing to stdout
.
@georgexsh That's a valid point: not sure why, but when I wrote the logs I let only the "error" level to be written to stderr, while others "info, warn and debug" would go stdout.
But yes, anything that isn't part of the program's standard output, shouldn't go to stdout. I'm going to prepare another PR suggesting this change.
I am using lab version 0.23.0, bash 5.1, steps to reproduce this issue:
RAND=$RANDOM; mkdir /tmp/$RAND; cd /tmp/$RAND; git init
source <(lab completion)
2022/02/10: No such file or directory
lab completion
outputs a line of log tostdout
like2022/02/10 13:07:32 root.go:205: No default remote found
, which bash'ssource
doesn't understand. I guess a possible solution is always output log tostderr
rather thanstdout
, or bypass local git remote checking when the command islab completion
.