Tweak progress bar message

Say "copying" instead of "fetching" when copying from another local
store. Nice for nixos-install.
This commit is contained in:
Eelco Dolstra 2018-02-05 18:32:23 +01:00
parent bb1d046f5c
commit 55012ec0b9
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE

View file

@ -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) {