diff --git a/bin/main.ml b/bin/main.ml index 9ac0556..9c4d4b4 100644 --- a/bin/main.ml +++ b/bin/main.ml @@ -70,11 +70,16 @@ let run_cmd args timeout_ms = let (rd, wr) = Unix.pipe () in let devnull = Unix.openfile "/dev/null" [Unix.O_RDONLY] 0 in let argv = Array.of_list args in + (* Run subprocesses in /tmp so commands that write side-effect files + (e.g. ckb-next-dev-detect-report.gz) don't pollute the working dir *) + let saved_cwd = Sys.getcwd () in + Sys.chdir "/tmp"; let pid = try Unix.create_process_env (List.hd args) argv (Lazy.force safe_env) devnull wr wr with Unix.Unix_error _ -> Unix.close rd; Unix.close wr; Unix.close devnull; -1 in + Sys.chdir saved_cwd; Unix.close wr; Unix.close devnull; if pid < 0 then (Unix.close rd; None) else begin diff --git a/inshellah.opam b/inshellah.opam index 8d020f1..cf4885a 100644 --- a/inshellah.opam +++ b/inshellah.opam @@ -15,6 +15,7 @@ depends: [ "angstrom" "angstrom-unix" "camlzip" + "sqlite3" "ppx_inline_test" {with-test} "odoc" {with-doc} ]