about summary refs log tree commit diff
path: root/src/nix
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2018-08-31T22·04+0200
committerEelco Dolstra <edolstra@gmail.com>2018-08-31T22·04+0200
commitb7409c57544997e6c31a05b5ca024e752cb1a35d (patch)
tree2fa6896ce5901d676df0b48651b6082826330873 /src/nix
parent4095cd6438812a3f7871796604f1ae548b592aeb (diff)
nix path-info: Remove trailing spaces
Fixes #2390.
Diffstat (limited to 'src/nix')
-rw-r--r--src/nix/path-info.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/nix/path-info.cc b/src/nix/path-info.cc
index 11c47bc4b499..dea5f0557b81 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);