diff --git a/CHANGELOG.md b/CHANGELOG.md index 2470c2e6..31668620 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +## [3.1.1] - 2023-07-01 + +[This patches](https://github.com/solidiquis/erdtree/pull/215) a deadlock that occurs when `--pattern` fails to make any matches and the progress indicator is enabled which causes `erdtree` to completely freeze. + ## [3.1.0] - 2023-07-01 ### [What's new](https://github.com/solidiquis/erdtree/pull/202) diff --git a/Cargo.lock b/Cargo.lock index 6e1ed6cb..3d37e679 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -278,7 +278,7 @@ dependencies = [ [[package]] name = "erdtree" -version = "3.1.0" +version = "3.1.1" dependencies = [ "ansi_term", "chrono", diff --git a/Cargo.toml b/Cargo.toml index 65f7ae6c..ee3f74b9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "erdtree" -version = "3.1.0" +version = "3.1.1" edition = "2021" authors = ["Benjamin Nguyen "] description = """ diff --git a/README.md b/README.md index 269cfee4..aef3f72d 100644 --- a/README.md +++ b/README.md @@ -332,7 +332,7 @@ no reason to have both. #### TOML file -`erdtree` will look for `.erdtree.toml in any of the following locations: +`erdtree` will look for `.erdtree.toml` in any of the following locations: On Unix-systems: diff --git a/src/context/mod.rs b/src/context/mod.rs index 829b9ca7..77648423 100644 --- a/src/context/mod.rs +++ b/src/context/mod.rs @@ -53,7 +53,7 @@ pub mod time; #[derive(Parser, Debug)] #[command(name = "erdtree")] #[command(author = "Benjamin Nguyen. ")] -#[command(version = "3.1.0")] +#[command(version = "3.1.1")] #[command(about = "erdtree (erd) is a cross-platform, multi-threaded, and general purpose filesystem and disk usage utility.", long_about = None)] pub struct Context { /// Directory to traverse; defaults to current working directory diff --git a/src/main.rs b/src/main.rs index 5c29e858..5f5e0b46 100644 --- a/src/main.rs +++ b/src/main.rs @@ -64,14 +64,11 @@ mod tty; mod utils; fn main() -> ExitCode { - let result = run(); - - tty::restore_tty(); - - if let Err(e) = result { + if let Err(e) = run() { eprintln!("{e}"); return ExitCode::FAILURE; } + ExitCode::SUCCESS } diff --git a/src/progress.rs b/src/progress.rs index 87395f94..a1cf32f3 100644 --- a/src/progress.rs +++ b/src/progress.rs @@ -123,6 +123,7 @@ impl IndicatorHandle { .transpose()?; } } + Ok(()) } } @@ -144,7 +145,7 @@ impl<'a> Indicator<'a> { while let Ok(msg) = rx.recv() { if prx.recv_timeout(PRIORITY_MAIL_TIMEOUT).is_ok() { indicator.update_state(IndicatorState::Done)?; - break; + return Ok(()); } match msg { @@ -185,6 +186,7 @@ impl<'a> Indicator<'a> { let stdout = &mut self.stdout; stdout.execute(terminal::Clear(ClearType::CurrentLine))?; stdout.execute(cursor::RestorePosition)?; + stdout.execute(cursor::Show)?; }, _ => (), }