mirror of
https://github.com/uutils/coreutils.git
synced 2026-06-10 15:48:22 -07:00
more: disable raw mode on error
This commit is contained in:
@@ -106,10 +106,11 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> {
|
||||
}
|
||||
let opened_file = match File::open(file) {
|
||||
Err(why) => {
|
||||
terminal::disable_raw_mode().unwrap();
|
||||
return Err(USimpleError::new(
|
||||
1,
|
||||
format!("cannot open {}: {}", file.quote(), why.kind()),
|
||||
))
|
||||
));
|
||||
}
|
||||
Ok(opened_file) => opened_file,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user