+use std::io::IsTerminal;
use std::path::PathBuf;
use anyhow::{bail, format_err, Error};
}
Kdf::Scrypt | Kdf::PBKDF2 => {
// always read passphrase from tty
- if !tty::stdin_isatty() {
+ if !std::io::stdin().is_terminal() {
bail!("unable to read passphrase - no tty");
}
let kdf = kdf.unwrap_or_default();
- if !tty::stdin_isatty() {
+ if !std::io::stdin().is_terminal() {
bail!("unable to change passphrase - no tty");
}
/// encryption key onto the backup server along with each backup.
fn create_master_key() -> Result<(), Error> {
// we need a TTY to query the new password
- if !tty::stdin_isatty() {
+ if !std::io::stdin().is_terminal() {
bail!("unable to create master key - no tty");
}