diff --git a/crates/bashkit/src/interpreter/mod.rs b/crates/bashkit/src/interpreter/mod.rs index f68c7ce04..2420d5d6a 100644 --- a/crates/bashkit/src/interpreter/mod.rs +++ b/crates/bashkit/src/interpreter/mod.rs @@ -640,6 +640,24 @@ fn decode_file_bytes_for_path(_path: &Path, bytes: &[u8]) -> String { String::from_utf8_lossy(bytes).into_owned() } +/// Child-shell counterpart of `recover_partial_parse` in `lib.rs`: commands +/// before a syntax error run, then the error is reported (exit 2). `bash -n` +/// keeps whole-script rejection since it only checks syntax. +fn nested_partial_parse( + (mut script, error): (Script, Option), + noexec: bool, + shell_name: &str, +) -> Result