1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-02 05:11:47 +02:00

Pass verbosity level to build hook

This commit is contained in:
Eelco Dolstra 2017-05-01 14:43:14 +02:00
parent 227a48f86f
commit b986c7f8b1
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE
2 changed files with 10 additions and 6 deletions

View file

@ -130,14 +130,15 @@ int main (int argc, char * * argv)
putenv(ssh_env) == -1)
throw SysError("setting SSH env vars");
if (argc != 4)
if (argc != 5)
throw UsageError("called without required arguments");
auto store = openStore();
auto localSystem = argv[1];
settings.maxSilentTime = stoull(string(argv[2]));
settings.buildTimeout = stoull(string(argv[3]));
settings.maxSilentTime = std::stoll(argv[2]);
settings.buildTimeout = std::stoll(argv[3]);
verbosity = (Verbosity) std::stoll(argv[4]);
currentLoad = getEnv("NIX_CURRENT_LOAD", "/run/nix/current-load");
@ -145,6 +146,8 @@ int main (int argc, char * * argv)
AutoCloseFD bestSlotLock;
auto machines = readConf();
debug("got %d remote builders", machines.size());
string drvPath;
string hostName;
for (string line; getline(cin, line);) {