Skip to content

Commit 48f4e10

Browse files
committed
fix(chat): use correct environment variable for default shell detection
1 parent 31921e6 commit 48f4e10

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/q_cli/src/cli/chat/tools/execute_shell_commands.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ impl ExecuteShellCommands {
9292

9393
pub async fn invoke(&self, mut updates: impl Write) -> Result<InvokeOutput> {
9494
// Detect the user's default shell
95-
let shell = std::env::var("$0").unwrap_or_else(|_| "bash".to_string());
95+
let shell = std::env::var("SHELL").unwrap_or_else(|_| "bash".to_string());
9696

9797
let home = std::env::var("HOME").unwrap_or_else(|_| "~".to_string());
9898
let shell_init_file = match shell.as_str() {

0 commit comments

Comments
 (0)