Fix bug with terminal getting weird

This commit is contained in:
Arijit Dey 2021-05-16 22:26:54 +05:30
parent d2ab0dcded
commit 22ba21d8ab
No known key found for this signature in database
GPG key ID: 2F7AC644CE7E007D
4 changed files with 16 additions and 12 deletions

23
Cargo.lock generated
View file

@ -847,15 +847,6 @@ version = "0.2.85"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7ccac4b00700875e6a07c6cde370d44d32fa01c5a65cdd2fca6858c479d28bb3"
[[package]]
name = "lock_api"
version = "0.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5a3c91c24eae6777794bb1997ad98bbb87daf92890acab859f7eaa4320333176"
dependencies = [
"scopeguard",
]
[[package]]
name = "locale"
version = "0.2.2"
@ -865,6 +856,15 @@ dependencies = [
"libc",
]
[[package]]
name = "lock_api"
version = "0.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5a3c91c24eae6777794bb1997ad98bbb87daf92890acab859f7eaa4320333176"
dependencies = [
"scopeguard",
]
[[package]]
name = "log"
version = "0.4.14"
@ -1091,7 +1091,7 @@ dependencies = [
"cfg-if 1.0.0",
"instant",
"libc",
"redox_syscall 0.2.6",
"redox_syscall 0.2.7",
"smallvec 1.6.1",
"winapi 0.3.9",
]
@ -1818,6 +1818,7 @@ dependencies = [
name = "uu_basename"
version = "0.0.6"
dependencies = [
"clap",
"uucore",
"uucore_procs",
]
@ -2263,6 +2264,7 @@ dependencies = [
name = "uu_more"
version = "0.0.6"
dependencies = [
"atty",
"clap",
"crossterm",
"nix 0.13.1",
@ -2774,6 +2776,7 @@ dependencies = [
name = "uu_who"
version = "0.0.6"
dependencies = [
"clap",
"uucore",
"uucore_procs",
]

View file

@ -347,7 +347,7 @@ unindent = "0.1"
uucore = { version=">=0.0.8", package="uucore", path="src/uucore", features=["entries"] }
walkdir = "2.2"
tempdir = "0.3"
atty = "*"
atty = "0.2.14"
[target.'cfg(unix)'.dev-dependencies]
rust-users = { version="0.10", package="users" }

View file

@ -19,7 +19,7 @@ clap = "2.33"
uucore = { version = ">=0.0.7", package = "uucore", path = "../../uucore" }
uucore_procs = { version = ">=0.0.5", package = "uucore_procs", path = "../../uucore_procs" }
crossterm = ">=0.19"
atty = "*"
atty = "0.2.14"
[target.'cfg(target_os = "redox")'.dependencies]
redox_termios = "0.1"

View file

@ -168,6 +168,7 @@ pub fn uumain(args: impl uucore::Args) -> i32 {
stdin().read_to_string(&mut buff).unwrap();
more(&buff, &mut stdout, true);
} else {
terminal::disable_raw_mode().unwrap();
show_usage_error!("bad usage");
}
}