1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-27 16:51:15 +02:00

More progress indicator improvements

Fixes #1599.
This commit is contained in:
Eelco Dolstra 2017-10-24 14:47:23 +02:00
parent be220702a7
commit 96051dd057
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE
5 changed files with 28 additions and 14 deletions

View file

@ -176,7 +176,7 @@ static Logger::Fields getFields(nlohmann::json & json)
}
bool handleJSONLogMessage(const std::string & msg,
const Activity & act, std::map<ActivityId, Activity> & activities)
const Activity & act, std::map<ActivityId, Activity> & activities, bool trusted)
{
if (!hasPrefix(msg, "@nix ")) return false;
@ -187,7 +187,7 @@ bool handleJSONLogMessage(const std::string & msg,
if (action == "start") {
auto type = (ActivityType) json["type"];
if (type == actDownload || type == actUnknown)
if (trusted || type == actDownload)
activities.emplace(std::piecewise_construct,
std::forward_as_tuple(json["id"]),
std::forward_as_tuple(*logger, (Verbosity) json["level"], type,