about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2018-02-05T17·32+0100
committerEelco Dolstra <edolstra@gmail.com>2018-02-05T17·32+0100
commit55012ec0b93351a0747b8d5d58b83ebc29dfaf61 (patch)
treeeefd33ba23823d0329ed742984d56b78ee568ec8
parentbb1d046f5c37a01ee85fc30d4602e8be8213eb84 (diff)
Tweak progress bar message
Say "copying" instead of "fetching" when copying from another local
store. Nice for nixos-install.
-rw-r--r--src/nix/progress-bar.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/nix/progress-bar.cc b/src/nix/progress-bar.cc
index fb9955190b40..8bffda54a551 100644
--- a/src/nix/progress-bar.cc
+++ b/src/nix/progress-bar.cc
@@ -167,7 +167,12 @@ public:
 
         if (type == actSubstitute) {
             auto name = storePathToName(getS(fields, 0));
-            i->s = fmt("fetching " ANSI_BOLD "%s" ANSI_NORMAL " from %s", name, getS(fields, 1));
+            auto sub = getS(fields, 1);
+            i->s = fmt(
+                hasPrefix(sub, "local")
+                ? "copying " ANSI_BOLD "%s" ANSI_NORMAL " from %s"
+                : "fetching " ANSI_BOLD "%s" ANSI_NORMAL " from %s",
+                name, sub);
         }
 
         if (type == actQueryPathInfo) {