mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-10 16:26:18 +02:00
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
1 changed files with 1 additions and 1 deletions
|
@ -154,7 +154,7 @@ public:
|
||||||
state->activitiesByType[type].its.emplace(act, i);
|
state->activitiesByType[type].its.emplace(act, i);
|
||||||
|
|
||||||
if (type == actBuild) {
|
if (type == actBuild) {
|
||||||
auto name = storePathToName(getS(fields, 0));
|
std::string name(storePathToName(getS(fields, 0)));
|
||||||
if (hasSuffix(name, ".drv"))
|
if (hasSuffix(name, ".drv"))
|
||||||
name = name.substr(0, name.size() - 4);
|
name = name.substr(0, name.size() - 4);
|
||||||
i->s = fmt("building " ANSI_BOLD "%s" ANSI_NORMAL, name);
|
i->s = fmt("building " ANSI_BOLD "%s" ANSI_NORMAL, name);
|
||||||
|
|
Loading…
Reference in a new issue