Merge branch 'feature/prefetch-progress' of https://github.com/dtzWill/nix

This commit is contained in:
Eelco Dolstra 2018-11-09 10:29:59 +01:00
commit 220c79ec22
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE

View file

@ -7,6 +7,8 @@
#include "common-eval-args.hh" #include "common-eval-args.hh"
#include "attr-path.hh" #include "attr-path.hh"
#include "legacy.hh" #include "legacy.hh"
#include "finally.hh"
#include "progress-bar.hh"
#include <iostream> #include <iostream>
@ -96,6 +98,11 @@ static int _main(int argc, char * * argv)
if (args.size() > 2) if (args.size() > 2)
throw UsageError("too many arguments"); throw UsageError("too many arguments");
Finally f([]() { stopProgressBar(); });
if (isatty(STDERR_FILENO))
startProgressBar();
auto store = openStore(); auto store = openStore();
auto state = std::make_unique<EvalState>(myArgs.searchPath, store); auto state = std::make_unique<EvalState>(myArgs.searchPath, store);