mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-29 12:07:46 +00:00
more: disable raw mode on error
This commit is contained in:
parent
50bff30c67
commit
eed916a076
1 changed files with 2 additions and 1 deletions
|
@ -106,10 +106,11 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> {
|
||||||
}
|
}
|
||||||
let opened_file = match File::open(file) {
|
let opened_file = match File::open(file) {
|
||||||
Err(why) => {
|
Err(why) => {
|
||||||
|
terminal::disable_raw_mode().unwrap();
|
||||||
return Err(USimpleError::new(
|
return Err(USimpleError::new(
|
||||||
1,
|
1,
|
||||||
format!("cannot open {}: {}", file.quote(), why.kind()),
|
format!("cannot open {}: {}", file.quote(), why.kind()),
|
||||||
))
|
));
|
||||||
}
|
}
|
||||||
Ok(opened_file) => opened_file,
|
Ok(opened_file) => opened_file,
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue