Dune: `dune build fmt` issues exit code <> 0

Created on 3 Dec 2019  路  1Comment  路  Source: ocaml/dune

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.

Most helpful comment

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.

>All comments

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

anton-trunov picture anton-trunov  路  3Comments

bobot picture bobot  路  7Comments

bobbypriambodo picture bobbypriambodo  路  5Comments

ShengChen picture ShengChen  路  5Comments

vsiles picture vsiles  路  7Comments