File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1515#include < vix/cli/commands/helpers/ProcessHelpers.hpp>
1616#include < vix/cli/commands/helpers/TextHelpers.hpp>
1717#include < vix/cli/commands/run/RunScriptHelpers.hpp>
18+ #include < vix/cli/ErrorHandler.hpp>
1819#include < vix/cli/Style.hpp>
1920#include < vix/utils/Env.hpp>
2021
@@ -480,10 +481,23 @@ namespace vix::commands::RunCommand::detail
480481
481482 if (build.exitCode != 0 )
482483 {
483- if (!build.failureHandled )
484+ if (!build.stdoutText .empty () || !build.stderrText .empty ())
485+ {
486+ const std::string compileLog = build.stdoutText + build.stderrText ;
487+ const bool handled = vix::cli::ErrorHandler::printBuildErrors (
488+ compileLog,
489+ plan.scriptPath ,
490+ " Script compile failed" );
491+
492+ if (!handled && !build.printed_live )
493+ handle_runtime_exit_code (build.exitCode , " compile" , false );
494+ }
495+ else if (!build.failureHandled && !build.printed_live )
496+ {
484497 handle_runtime_exit_code (build.exitCode , " compile" , false );
498+ }
485499
486- return build. exitCode == 0 ? 1 : build.exitCode ;
500+ return - build.exitCode ;
487501 }
488502
489503 const std::string meta = make_direct_cache_meta (plan.scriptPath , plan);
You can’t perform that action at this time.
0 commit comments