agave-install 4.1.0-beta.2

The solana cluster software installer
Documentation
use std::{
    io::{self, IsTerminal},
    process::exit,
};

fn press_enter() {
    // On windows, where installation happens in a console that may have opened just for this
    // purpose, give the user an opportunity to see the error before the window closes.
    if cfg!(windows) && io::stdin().is_terminal() {
        println!();
        println!("Press the Enter key to continue.");

        use std::io::BufRead;
        let stdin = std::io::stdin();
        let stdin = stdin.lock();
        let mut lines = stdin.lines();
        lines.next();
    }
}

fn main() {
    agave_install::main_init().unwrap_or_else(|err| {
        println!("Error: {err}");
        press_enter();
        exit(1);
    });
    press_enter();
}