File tree Expand file tree Collapse file tree
include/vix/cli/commands/run Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -181,6 +181,14 @@ namespace vix::commands::RunCommand::detail
181181 const std::filesystem::path &projectDir,
182182 const std::string &configurePreset);
183183
184+ inline int effective_timeout_sec (const Options &opt)
185+ {
186+ if (opt.forceServerLike || opt.watch )
187+ return 0 ;
188+
189+ return opt.timeoutSec ;
190+ }
191+
184192} // namespace vix::commands::RunCommand::detail
185193
186194#endif
Original file line number Diff line number Diff line change @@ -543,8 +543,8 @@ namespace vix::commands::RunCommand
543543 const LiveRunResult tr = run_cmd_live_filtered_capture (
544544 quote (testExe->string ()),
545545 /* spinnerLabel=*/ " " ,
546- /* passthroughRuntime=*/ false ,
547- /* timeoutSec=*/ opt. timeoutSec );
546+ /* passthroughRuntime=*/ true ,
547+ /* timeoutSec=*/ effective_timeout_sec ( opt) );
548548
549549 const int testExit = tr.exitCode ;
550550
@@ -620,11 +620,15 @@ namespace vix::commands::RunCommand
620620#else
621621 std::string runCmd = quote (exePath.string ());
622622
623+ int timeout = opt.timeoutSec ;
624+ if (opt.forceServerLike || opt.watch )
625+ timeout = 0 ;
626+
623627 const LiveRunResult rr = run_cmd_live_filtered_capture (
624628 runCmd,
625629 /* spinnerLabel=*/ " " ,
626- /* passthroughRuntime=*/ false , // IMPORTANT: capture only
627- /* timeoutSec=*/ opt. timeoutSec );
630+ /* passthroughRuntime=*/ true ,
631+ /* timeoutSec=*/ effective_timeout_sec ( opt) );
628632
629633 int runExit = rr.exitCode ;
630634
You can’t perform that action at this time.
0 commit comments