mirror of
https://github.com/uutils/coreutils
synced 2024-12-17 16:43:16 +00:00
Fix broken terminal in tests
This commit is contained in:
parent
c930509095
commit
7a88df9fb4
1 changed files with 3 additions and 3 deletions
|
@ -133,8 +133,8 @@ pub fn uumain(args: impl uucore::Args) -> i32 {
|
|||
)
|
||||
.get_matches_from(args);
|
||||
let mut buff = String::new();
|
||||
let mut stdout = setup_term();
|
||||
if let Some(filenames) = matches.values_of(options::FILES) {
|
||||
let mut stdout = setup_term();
|
||||
let length = filenames.len();
|
||||
for (idx, fname) in filenames.clone().enumerate() {
|
||||
let fname = Path::new(fname);
|
||||
|
@ -163,11 +163,11 @@ pub fn uumain(args: impl uucore::Args) -> i32 {
|
|||
}
|
||||
reset_term(&mut stdout);
|
||||
} else if atty::isnt(atty::Stream::Stdin) {
|
||||
let mut stdout = setup_term();
|
||||
stdin().read_to_string(&mut buff).unwrap();
|
||||
let mut stdout = setup_term();
|
||||
more(&buff, &mut stdout, true);
|
||||
reset_term(&mut stdout);
|
||||
} else {
|
||||
terminal::disable_raw_mode().unwrap();
|
||||
show_usage_error!("bad usage");
|
||||
}
|
||||
0
|
||||
|
|
Loading…
Reference in a new issue