diff options
author | andy.boot <bootandy@gmail.com> | 2023-01-29 10:02:45 +0000 |
---|---|---|
committer | andy.boot <bootandy@gmail.com> | 2023-01-29 10:24:36 +0000 |
commit | 7efdf63fbc15327b627b8d8737ea1535d085e6ea (patch) | |
tree | 3721507628786406b1fdbe9db56b781ddb4fc54e | |
parent | 184d1ec5e8f739049e6c710afe58eeb8e10a14bb (diff) |
fix: Stop progress indicator crashing into stderr
-rw-r--r-- | src/main.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs index e8df466..2e2b3e3 100644 --- a/src/main.rs +++ b/src/main.rs @@ -209,10 +209,12 @@ fn main() { } }; - if indicator.data.no_permissions.load(ORDERING) { + let failed_permissions = indicator.data.no_permissions.load(ORDERING); + indicator.stop(); + // Must have stopped indicator before we print to stderr + if failed_permissions { eprintln!("Did not have permissions for all directories"); } - indicator.stop(); if let Some(root_node) = tree { draw_it( |