2019-06-08 19:01:22 -07:00
|
|
|
use std::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.
|
2019-06-28 17:43:43 -07:00
|
|
|
if cfg!(windows) && atty::is(atty::Stream::Stdin) {
|
|
|
|
println!();
|
|
|
|
println!("Press the Enter key to continue.");
|
2019-06-08 19:01:22 -07:00
|
|
|
|
2019-06-28 17:43:43 -07:00
|
|
|
use std::io::BufRead;
|
|
|
|
let stdin = std::io::stdin();
|
|
|
|
let stdin = stdin.lock();
|
|
|
|
let mut lines = stdin.lines();
|
|
|
|
lines.next();
|
|
|
|
}
|
2019-06-08 19:01:22 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
2024-02-21 19:44:01 -08:00
|
|
|
agave_install::main_init().unwrap_or_else(|err| {
|
2022-12-06 06:30:06 -08:00
|
|
|
println!("Error: {err}");
|
2019-06-08 19:01:22 -07:00
|
|
|
press_enter();
|
|
|
|
exit(1);
|
|
|
|
});
|
|
|
|
press_enter();
|
|
|
|
}
|