Skip to content

Commit

Permalink
Make the diffPath optional
Browse files Browse the repository at this point in the history
  • Loading branch information
serpent7776 committed Oct 12, 2024
1 parent c58c505 commit 543844b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion bin/Main.ml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ let main img1Path img2Path diffPath threshold outputDiffMask failOnLayoutChange
->
{ exitCode = 0; diff = Some diffOutput }
| Pixel (diffOutput, diffCount, diffPercentage, _) ->
IO1.saveImage diffOutput diffPath;
diffPath |> Option.iter (IO1.saveImage diffOutput);
{ exitCode = 22; diff = Some diffOutput }
in
IO1.freeImage img1;
Expand Down
4 changes: 2 additions & 2 deletions bin/ODiffBin.ml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ open Term
open Arg

let diffPath =
value & pos 2 string ""
& info [] ~docv:"DIFF" ~doc:"Diff output path (.png only)"
value & pos 2 (some string) None
& info [] ~docv:"DIFF" ~doc:"Optional Diff output path (.png only)"

let base =
value & pos 0 file "" & info [] ~docv:"BASE" ~doc:"Path to base image"
Expand Down

0 comments on commit 543844b

Please sign in to comment.