From c261da4d0efea4d86131abbbc2912edfa863995e Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sat, 28 Dec 2019 08:50:19 +0000 Subject: [PATCH] Run code with set -e / set -x. --- src/eval.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/eval.ml b/src/eval.ml index 9fc6e5c..46455f7 100644 --- a/src/eval.ml +++ b/src/eval.ml @@ -96,7 +96,7 @@ and run_goal env loc name args (params, patterns, deps, code) = | [] -> env | d :: _ -> Ast.Env.add "^" d env in let code = Ast.to_shell_script env loc code in - printf "%s\n%!" (trim code); + let code = "set -e\nset -x\n\n" ^ code in let r = Sys.command code in if r <> 0 then ( eprintf "*** goal ‘%s’ failed with exit code %d\n" name r; -- 1.8.3.1