When running dune build @fmt on a file that needs reformatting, dune exits with an error code different from 0. I guess this is to allow other scripts to take this situation into account. But I think this should at least be documented, as for instance, make isn't happy when command return with exit code <> 0. Or the exit code could be 0 if the command is run with the --auto-promote option. The red "Error" message is misleading too.
I suppose yeah. When --auto-promote is passed, we could run the build in a loop until it succeeds. And maybe hide the diff as well.
Most helpful comment
I suppose yeah. When
--auto-promoteis passed, we could run the build in a loop until it succeeds. And maybe hide the diff as well.