diff --git a/CHANGELOG.md b/CHANGELOG.md --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,8 @@ problematic string is now surrounded in quotes. - Status bar is cleaned every time after execution is completed. - Fixed garnix docs links in documentation. +- Forces `bash` instead of remote user's potentially unsupported shell. This bug + was causing strange and hard to diagnose issues. ## [v1.2.0] - 2026-03-18 diff --git a/crates/core/src/commands/noninteractive.rs b/crates/core/src/commands/noninteractive.rs --- a/crates/core/src/commands/noninteractive.rs +++ b/crates/core/src/commands/noninteractive.rs @@ -39,7 +39,7 @@ let mut command = if let Some(ref target) = arguments.target { create_sync_ssh_command(target, arguments.modifiers).await? } else { - let mut command = Command::new("sh"); + let mut command = Command::new("bash"); command.arg("-c"); diff --git a/crates/core/src/commands/pty/mod.rs b/crates/core/src/commands/pty/mod.rs --- a/crates/core/src/commands/pty/mod.rs +++ b/crates/core/src/commands/pty/mod.rs @@ -323,7 +323,7 @@ command } else { - let mut command = portable_pty::CommandBuilder::new("sh"); + let mut command = portable_pty::CommandBuilder::new("bash"); command.arg("-c"); @@ -331,9 +331,9 @@ }; if arguments.is_elevated() { - command.arg(format!("sudo -u root -- sh -c '{command_string}'")); + command.arg(format!("sudo -u root -- bash -c '{command_string}'")); } else { - command.arg(command_string); + command.arg(format!("bash -c '{command_string}'")); } Ok(command)