From b7409c57544997e6c31a05b5ca024e752cb1a35d Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Sat, 1 Sep 2018 00:04:57 +0200 Subject: [PATCH] nix path-info: Remove trailing spaces Fixes #2390. --- src/nix/path-info.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/nix/path-info.cc b/src/nix/path-info.cc index 11c47bc4..dea5f055 100644 --- a/src/nix/path-info.cc +++ b/src/nix/path-info.cc @@ -103,7 +103,10 @@ struct CmdPathInfo : StorePathsCommand, MixJSON auto info = store->queryPathInfo(storePath); storePath = info->path; // FIXME: screws up padding - std::cout << storePath << std::string(std::max(0, (int) pathLen - (int) storePath.size()), ' '); + std::cout << storePath; + + if (showSize || showClosureSize || showSigs) + std::cout << std::string(std::max(0, (int) pathLen - (int) storePath.size()), ' '); if (showSize) printSize(info->narSize);