Don't run Powershell in a dumb terminal (fix #110)

This commit is contained in:
Roey Darwish Dror
2019-01-21 20:12:56 +02:00
parent 65e81872ac
commit 84323d9729
2 changed files with 11 additions and 2 deletions

View File

@@ -126,3 +126,8 @@ pub fn print_warning<P: AsRef<str>>(message: P) {
pub fn print_result<P: AsRef<str>>(key: P, succeeded: bool) {
TERMINAL.lock().unwrap().print_result(key, succeeded)
}
/// Tells whether the terminal is dumb.
pub fn is_dumb() -> bool {
TERMINAL.lock().unwrap().width.is_none()
}