Skip to content

Commit 543844b

Browse files
committed
Make the diffPath optional
1 parent c58c505 commit 543844b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

bin/Main.ml

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ let main img1Path img2Path diffPath threshold outputDiffMask failOnLayoutChange
6060
->
6161
{ exitCode = 0; diff = Some diffOutput }
6262
| Pixel (diffOutput, diffCount, diffPercentage, _) ->
63-
IO1.saveImage diffOutput diffPath;
63+
diffPath |> Option.iter (IO1.saveImage diffOutput);
6464
{ exitCode = 22; diff = Some diffOutput }
6565
in
6666
IO1.freeImage img1;

bin/ODiffBin.ml

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ open Term
33
open Arg
44

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

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

0 commit comments

Comments
 (0)