From 1dfb8c1c8f9c993e8398b8f8bbbe77e17dd487b6 Mon Sep 17 00:00:00 2001 From: Anton Smirnov Date: Thu, 17 Oct 2024 11:45:09 +0300 Subject: [PATCH] More robust artifact library loading --- src/discovery/utils.jl | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/discovery/utils.jl b/src/discovery/utils.jl index 66be883dd..1f00f900d 100644 --- a/src/discovery/utils.jl +++ b/src/discovery/utils.jl @@ -41,13 +41,14 @@ end function safe_exec(str) cmd = julia_cmd_projects(str) success = false - error_str = mktemp() do path, _ - p = run(pipeline(cmd; stdout=path, stderr=path); wait=false) + res_str, err_str = mktemp() do path, _ + p = run(pipeline(cmd; stdout=path, stderr="$path.err"); wait=false) wait(p) success = p.exitcode == 0 - strip(String(read(path))) + res_str = strip(String(read(path))) + err_str = strip(String(read("$path.err"))) end - return success, error_str + return success, res_str end """