From 5d0f6b8a3d15924f6e21df5ec61d3e94582b83c0 Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Sat, 9 Nov 2024 09:24:35 +0300 Subject: [PATCH] ci: use os.system to redirect output --- ci/macos_ci.vsh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ci/macos_ci.vsh b/ci/macos_ci.vsh index 5b89bd9fed..f706e58958 100644 --- a/ci/macos_ci.vsh +++ b/ci/macos_ci.vsh @@ -73,16 +73,17 @@ fn run_step(step Command) { // Helper function to execute commands and exit if they fail fn exec(command string) { - result := os.execute(command) + result := os.system(command) // or { // eprintln('Command failed: $command\nError: $err') // exit(1) //} - if result.exit_code != 0 { - eprintln('Command failed with code ${result.exit_code}: ${command}\nOutput: ${result.output}') + // if result.exit_code != 0 { + if result != 0 { + // eprintln('Command failed with code ${result.exit_code}: ${command}\nOutput: ${result.output}') exit(1) } - println(result.output) + // println(result.output) } // Map enum values to human readable step names