Fix log-prefix of nix build -L
Alternative fix to #3661. The cause was that 'name' is a std::string_view into a temporary which could get overwritten.
This commit is contained in:
parent
ef798f73ea
commit
39e84c35d0
|
@ -154,7 +154,7 @@ public:
|
|||
state->activitiesByType[type].its.emplace(act, i);
|
||||
|
||||
if (type == actBuild) {
|
||||
auto name = storePathToName(getS(fields, 0));
|
||||
std::string name(storePathToName(getS(fields, 0)));
|
||||
if (hasSuffix(name, ".drv"))
|
||||
name = name.substr(0, name.size() - 4);
|
||||
i->s = fmt("building " ANSI_BOLD "%s" ANSI_NORMAL, name);
|
||||
|
|
Loading…
Reference in a new issue