Fix command line printing for errors

This commit is contained in:
Rudi Grinberg 2018-05-19 18:11:31 +07:00
parent 8e72a3a951
commit 9a62e70471
2 changed files with 6 additions and 2 deletions

View File

@ -112,7 +112,11 @@ module Fancy = struct
| x :: rest -> x :: colorize_args rest
let command_line ~prog ~args ~dir ~stdout_to ~stderr_to =
let prog = Path.to_string prog in
let prog =
match dir with
| None -> Path.to_string prog
| Some from -> Path.reach_for_running prog ~from
in
let quote = quote_for_shell in
let prog = colorize_prog (quote prog) in
let s =

View File

@ -1,6 +1,6 @@
$ env -u OCAMLRUNPARAM jbuilder runtest simple
run alias simple/runtest (exit 2)
(cd _build/default/simple && _build/default/simple/.foo_simple.inline-tests/run.exe)
(cd _build/default/simple && ./.foo_simple.inline-tests/run.exe)
Fatal error: exception File "simple/.foo_simple.inline-tests/run.ml", line 1, characters 10-16: Assertion failed
[1]