about summary refs log tree commit diff
path: root/src/nix/main.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/nix/main.cc')
-rw-r--r--src/nix/main.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/nix/main.cc b/src/nix/main.cc
index 9781b58544fe..ec9b58b20fe8 100644
--- a/src/nix/main.cc
+++ b/src/nix/main.cc
@@ -8,6 +8,7 @@
 #include "shared.hh"
 #include "store-api.hh"
 #include "progress-bar.hh"
+#include "finally.hh"
 
 extern std::string chrootHelperName;
 
@@ -84,6 +85,8 @@ void mainWrapped(int argc, char * * argv)
 
     if (!args.command) args.showHelpAndExit();
 
+    Finally f([]() { stopProgressBar(); });
+
     if (isatty(STDERR_FILENO))
         startProgressBar();