File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
crates/q_cli/src/cli/chat/tools Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ use super::{
2525#[ derive( Debug , Deserialize ) ]
2626pub struct ExecuteBash {
2727 pub command : String ,
28- pub interactive : bool ,
28+ pub interactive : Option < bool > ,
2929}
3030
3131impl ExecuteBash {
@@ -39,8 +39,8 @@ impl ExecuteBash {
3939 ) ?;
4040
4141 let ( stdin, stdout, stderr) = match self . interactive {
42- true => ( Stdio :: inherit ( ) , Stdio :: inherit ( ) , Stdio :: inherit ( ) ) ,
43- false => ( Stdio :: piped ( ) , Stdio :: piped ( ) , Stdio :: piped ( ) ) ,
42+ Some ( true ) => ( Stdio :: inherit ( ) , Stdio :: inherit ( ) , Stdio :: inherit ( ) ) ,
43+ _ => ( Stdio :: piped ( ) , Stdio :: piped ( ) , Stdio :: piped ( ) ) ,
4444 } ;
4545
4646 let output = tokio:: process:: Command :: new ( "bash" )
@@ -58,7 +58,7 @@ impl ExecuteBash {
5858 let stdout = output. stdout . to_str_lossy ( ) ;
5959 let stderr = output. stderr . to_str_lossy ( ) ;
6060
61- if ! self . interactive {
61+ if let Some ( false ) = self . interactive {
6262 execute ! ( updates, style:: Print ( & stdout) ) ?;
6363 }
6464
You can’t perform that action at this time.
0 commit comments