Skip to content

Commit

Permalink
shared(prompts): fail on no TTY if interactivity was needed
Browse files Browse the repository at this point in the history
Fixes #98
  • Loading branch information
mcginty committed Jun 14, 2021
1 parent 449b4b8 commit 72ef070
Show file tree
Hide file tree
Showing 5 changed files with 120 additions and 135 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 9 additions & 1 deletion hostsfile/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
use std::{collections::HashMap, fmt, fs::OpenOptions, io::{self, BufRead, BufReader, ErrorKind, Write}, net::IpAddr, path::{Path, PathBuf}, result};
use std::{
collections::HashMap,
fmt,
fs::OpenOptions,
io::{self, BufRead, BufReader, ErrorKind, Write},
net::IpAddr,
path::{Path, PathBuf},
result,
};

pub type Result<T> = result::Result<T, Box<dyn std::error::Error>>;

Expand Down
1 change: 1 addition & 0 deletions shared/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ version = "1.3.1"

[dependencies]
anyhow = "1"
atty = "0.2"
colored = "2.0"
dialoguer = "0.8"
indoc = "1"
Expand Down
Loading

0 comments on commit 72ef070

Please sign in to comment.