-
Notifications
You must be signed in to change notification settings - Fork 425
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
--print
flag does not redirect output to stdout
#912
Comments
I'll take a look (or someone else can, if they want). I'm doubtful as to the utility of this anyway, because most The only way |
Hey @LandonTClipp Thanks for taking a look! I totally get your point about the Here’s what I had in mind: test "$( mockery --print | sha256sum | awk '{print $1}' )" = "$( cat mocks/**/*.go | sha256sum | awk '{print $1}' )" || exit 1 This would help me check if the generated mocks match the existing ones by comparing the I get that it might not be the most common use case, but it’d definitely be helpful for anyone needing to ensure their mocks are in sync with the interfaces. Just wanted to share why I think keeping the |
That definitely makes sense, although given how the configuration model is used to specify all interfaces to be mocked, I don't know how you would implement this. To do the hash comparison, you would need some way to tell mockery specifically which output file you want generated. Without doing that, |
I think the
--print
flag is not working as expected. According to the documentation:But when I use
print
, the generated code still gets written to a file instead of being printed tostdout
. I tried:--print
as a cli flagprint: true
in the config fileIn both cases, the output was still written to a file. I’m not sure if I’m missing something or if this is a bug.
Installation: Homebrew
Version: v2.50.0
The text was updated successfully, but these errors were encountered: