Skip to content
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

buildozer -stdout exits 0 and outputs nothing when no changes are made #1324

Open
gholms opened this issue Jan 17, 2025 · 0 comments
Open

buildozer -stdout exits 0 and outputs nothing when no changes are made #1324

gholms opened this issue Jan 17, 2025 · 0 comments

Comments

@gholms
Copy link

gholms commented Jan 17, 2025

When buildozer 8.0.0 runs fixes without the -stdout flag, it exits with status 3 and prints nothing when it has no changes to make. When it runs on the same BUILD file with the -stdout flag, it also outputs nothing to stdout and exits with status 0. This makes it ambiguous whether the output is missing because buildozer had nothing to do or because its altered output is legitimately an empty file.

My preference would be to have the -stdout flag always produce BUILD file content whether it was altered or not. If we need to differentiate those two cases then let's use the exit status to do that.

To reproduce this, run buildozer -stdout 'fix unusedLoads' //:__pkg__ on this project's workspace.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant