A fork of attic a self-hostable Nix Binary Cache server
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

client/push: Suggest --stdin if stdin isn't a terminal

+11
+11
client/src/command/push.rs
··· 1 + use std::io::IsTerminal; 1 2 use std::path::PathBuf; 2 3 use std::sync::Arc; 3 4 ··· 57 58 58 59 impl PushContext { 59 60 async fn push_static(self, paths: Vec<PathBuf>) -> Result<()> { 61 + if paths.is_empty() { 62 + eprintln!("🤷 Nothing specified."); 63 + if !std::io::stdin().is_terminal() { 64 + eprintln!( 65 + "Hint: Pass --stdin to read the list of store paths from standard input." 66 + ); 67 + } 68 + return Ok(()); 69 + } 70 + 60 71 let roots = paths 61 72 .into_iter() 62 73 .map(|p| self.store.follow_store_path(p))