monitor_cli 1.13.3

Command line tool to sync monitor resources and execute file defined procedures
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use std::io::Read;

use anyhow::Context;
use colored::Colorize;

pub fn wait_for_enter(press_enter_to: &str) -> anyhow::Result<()> {
  println!(
    "\nPress {} to {}\n",
    "ENTER".green(),
    press_enter_to.bold()
  );
  let buffer = &mut [0u8];
  std::io::stdin()
    .read_exact(buffer)
    .context("failed to read ENTER")?;
  Ok(())
}