about summary refs log tree commit diff
path: root/src/nix/main.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2017-08-29T13·13+0200
committerEelco Dolstra <edolstra@gmail.com>2017-08-29T13·13+0200
commitc8235c531355d612d48f633f8a6ace5fcd97f5fe (patch)
treec54d398380ef786e6895b5427774bbd750566b31 /src/nix/main.cc
parent05d68a6e23127e490193599f75489006830b302c (diff)
nix run: Flush the progress bar before starting the command
Diffstat (limited to 'src/nix/main.cc')
-rw-r--r--src/nix/main.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nix/main.cc b/src/nix/main.cc
index 0990549aeecd..9781b58544fe 100644
--- a/src/nix/main.cc
+++ b/src/nix/main.cc
@@ -84,7 +84,8 @@ void mainWrapped(int argc, char * * argv)
 
     if (!args.command) args.showHelpAndExit();
 
-    StartProgressBar bar;
+    if (isatty(STDERR_FILENO))
+        startProgressBar();
 
     args.command->prepare();
     args.command->run();