Skip to content

Commit c461f66

Browse files
committed
chore: hint shell check
1 parent 60d64b1 commit c461f66

1 file changed

Lines changed: 12 additions & 3 deletions

File tree

core/src/shell.rs

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,10 @@ pub fn error_output_threaded(shell: &str, command: &str, timeout: u64) -> String
144144
clean_shell_command(shell, command)
145145
.env("LC_ALL", "C")
146146
.output()
147-
.expect("failed to execute process"),
147+
.expect(&format!(
148+
"failed to execute process, is '{}' the correct executable?",
149+
shell
150+
)),
148151
)
149152
.expect("failed to send output");
150153
});
@@ -167,7 +170,10 @@ pub fn command_output(shell: &str, command: &str) -> String {
167170
let output = clean_shell_command(shell, command)
168171
.env("LC_ALL", "C")
169172
.output()
170-
.expect("failed to execute process");
173+
.expect(&format!(
174+
"failed to execute process, is '{}' the correct executable?",
175+
shell
176+
));
171177

172178
let err = String::from_utf8_lossy(&output.stderr);
173179
if !err.is_empty() {
@@ -182,7 +188,10 @@ pub fn command_output_or_error(shell: &str, command: &str) -> String {
182188
let output = clean_shell_command(shell, command)
183189
.env("LC_ALL", "C")
184190
.output()
185-
.expect("failed to execute process");
191+
.expect(&format!(
192+
"failed to execute process, is '{}' the correct executable?",
193+
shell
194+
));
186195

187196
if !output.stdout.is_empty() {
188197
String::from_utf8_lossy(&output.stdout).to_string()

0 commit comments

Comments
 (0)