summaryrefslogtreecommitdiffstats
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs
index 3725258..ec61370 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -141,6 +141,9 @@ async fn run(config: GlobalConfig, cli: Cli, text: Option<String>) -> Result<()>
}
let is_repl = config.read().working_mode.is_repl();
if cli.execute && !is_repl {
+ if cfg!(target_os = "macos") && !stdin().is_terminal() {
+ bail!("Unable to read the pipe for shell execution on MacOS")
+ }
let input = create_input(&config, text, &cli.file).await?;
shell_execute(&config, &SHELL, input).await?;
return Ok(());