Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Allow CLI prompts with piped input on Unix

Manav Rathid9bdba1184e7
diff --git a/rust/apps/cli-next/src/args.rs b/rust/apps/cli-next/src/args.rs
index 58a1765e3c..a3aef029c1 100644
--- a/rust/apps/cli-next/src/args.rs
+++ b/rust/apps/cli-next/src/args.rs
@@ -39,7 +39,9 @@ pub struct Options {
impl Options {
pub fn can_prompt(&self) -> bool {
- !self.no_input && std::io::stdin().is_terminal() && std::io::stderr().is_terminal()
+ !self.no_input
+ && std::io::stderr().is_terminal()
+ && (cfg!(unix) || std::io::stdin().is_terminal())
}
}