Skip to content

Commit 3b43f5f

Browse files
authored
feat: add support for custom shells using an env var AMAZON_Q_CHAT_SHELL (#377)
1 parent f872314 commit 3b43f5f

File tree

1 file changed

+3
-1
lines changed
  • crates/chat-cli/src/cli/chat/tools/execute

1 file changed

+3
-1
lines changed

crates/chat-cli/src/cli/chat/tools/execute/unix.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,10 @@ pub async fn run_command<W: Write>(
2727
max_result_size: usize,
2828
mut updates: Option<W>,
2929
) -> Result<CommandResult> {
30+
let shell = std::env::var("AMAZON_Q_CHAT_SHELL").unwrap_or("bash".to_string());
31+
3032
// We need to maintain a handle on stderr and stdout, but pipe it to the terminal as well
31-
let mut child = tokio::process::Command::new("bash")
33+
let mut child = tokio::process::Command::new(shell)
3234
.arg("-c")
3335
.arg(command)
3436
.stdin(Stdio::inherit())

0 commit comments

Comments
 (0)