diff options
author | Alois Wohlschlager <alois1@gmx-topmail.de> | 2024-09-18 19:25:25 +0200 |
---|---|---|
committer | Alois Wohlschlager <alois1@gmx-topmail.de> | 2024-09-18 19:26:40 +0200 |
commit | 2afdf1ed660d0592bf488fa1be68fe0666716421 (patch) | |
tree | 23a9bb208b1e56c10aa98d49b07e7ff9e871b636 /src/nix | |
parent | 8ab5743904a06c78153281bf61b3aa8aa451a489 (diff) |
path-info: wipe the progress bar before printing
The legitimate output of `nix path-info` may visually interfere with the
progress bar, by appending to stale progress output before the latter has been
erased. Conveniently, all expensive operations (evaluation or building) have
already been performed before, so we can simply wipe the progress bar at this
point to fix the issue.
Fixes: https://git.lix.systems/lix-project/lix/issues/343
Change-Id: Id9a807a5c882295b3e6fbf841f9c15dc96f67f6e
Diffstat (limited to 'src/nix')
-rw-r--r-- | src/nix/path-info.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/nix/path-info.cc b/src/nix/path-info.cc index b14eef467..05578ea53 100644 --- a/src/nix/path-info.cc +++ b/src/nix/path-info.cc @@ -82,6 +82,10 @@ struct CmdPathInfo : StorePathsCommand, MixJSON void run(ref<Store> store, StorePaths && storePaths) override { + // Wipe the progress bar to prevent interference with the output. + // It's not needed any more because expensive evaluation or builds are already done here. + logger->pause(); + size_t pathLen = 0; for (auto & storePath : storePaths) pathLen = std::max(pathLen, store->printStorePath(storePath).size()); |