From b8c35156e7d73ebb2ebde47551f617e08e7a7388 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Dimino?= Date: Sun, 26 Feb 2017 19:51:42 +0000 Subject: [PATCH] Fix command line printing when there is a redirection --- src/future.ml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/future.ml b/src/future.ml index 7ceb8d54..e5e7b188 100644 --- a/src/future.ml +++ b/src/future.ml @@ -233,13 +233,13 @@ module Scheduler = struct let prog = colorize_prog (quote prog) in let s = String.concat (prog :: colorize_args (List.map args ~f:quote)) ~sep:" " in let s = - match stdout_to with + match dir with | None -> s - | Some fn -> sprintf "%s > %s" s fn + | Some dir -> sprintf "(cd %s && %s)" dir s in - match dir with + match stdout_to with | None -> s - | Some dir -> sprintf "(cd %s && %s)" dir s + | Some fn -> sprintf "%s > %s" s fn type running_job = { id : int