Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1180,7 +1180,7 @@ async fn main() -> io::Result<()> {
// Log execution start if execution logging is enabled
exec_trace!("Starting execution of script: {}", &file_path);

let mut interpreter = Interpreter::with_timeout(config.timeout_seconds);
let mut interpreter = Interpreter::with_config(std::sync::Arc::new(config.clone()));

Copilot AI Apr 24, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Switching from Interpreter::with_timeout(...) to Interpreter::with_config(...) changes timeout semantics: with_timeout clamps the timeout to a max of 300s, but with_config uses config.timeout_seconds as-is. If the 300s cap is intentional (e.g., to prevent extremely long-running scripts), consider preserving it here by clamping config.timeout_seconds before constructing the interpreter or by moving the cap into config loading/validation so both constructors behave consistently.

Suggested change
let mut interpreter = Interpreter::with_config(std::sync::Arc::new(config.clone()));
let mut interpreter_config = config.clone();
interpreter_config.timeout_seconds = interpreter_config.timeout_seconds.min(300);
let mut interpreter =
Interpreter::with_config(std::sync::Arc::new(interpreter_config));

Copilot uses AI. Check for mistakes.
interpreter.set_step_mode(step_mode); // Set step mode from CLI flag
interpreter.set_test_mode(test_mode); // Set test mode from CLI flag
interpreter.set_script_args(script_args); // Pass script arguments
Expand Down
Loading