diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2020-05-05 18:59:33 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2020-05-05 18:59:33 +0200 |
commit | 6f3244ce4517cc51ef3ffd39025152aa7046ef69 (patch) | |
tree | 588f8deb7406821d2d1157c310e15adde4001a61 /src/libstore | |
parent | 941f95284ab57e9baa317791327cf1715d8564b5 (diff) | |
parent | 909b4a882057a92ae8b40b8afdab3c4ac30da915 (diff) |
Merge remote-tracking branch 'origin/master' into flakes
Diffstat (limited to 'src/libstore')
-rw-r--r-- | src/libstore/globals.cc | 33 | ||||
-rw-r--r-- | src/libstore/remote-store.cc | 6 |
2 files changed, 22 insertions, 17 deletions
diff --git a/src/libstore/globals.cc b/src/libstore/globals.cc index d6ea0318e..a0a2d850e 100644 --- a/src/libstore/globals.cc +++ b/src/libstore/globals.cc @@ -167,21 +167,24 @@ template<> void BaseSetting<SandboxMode>::toJSON(JSONPlaceholder & out) template<> void BaseSetting<SandboxMode>::convertToArg(Args & args, const std::string & category) { - args.mkFlag() - .longName(name) - .description("Enable sandboxing.") - .handler([=](std::vector<std::string> ss) { override(smEnabled); }) - .category(category); - args.mkFlag() - .longName("no-" + name) - .description("Disable sandboxing.") - .handler([=](std::vector<std::string> ss) { override(smDisabled); }) - .category(category); - args.mkFlag() - .longName("relaxed-" + name) - .description("Enable sandboxing, but allow builds to disable it.") - .handler([=](std::vector<std::string> ss) { override(smRelaxed); }) - .category(category); + args.addFlag({ + .longName = name, + .description = "Enable sandboxing.", + .category = category, + .handler = {[=]() { override(smEnabled); }} + }); + args.addFlag({ + .longName = "no-" + name, + .description = "Disable sandboxing.", + .category = category, + .handler = {[=]() { override(smDisabled); }} + }); + args.addFlag({ + .longName = "relaxed-" + name, + .description = "Enable sandboxing, but allow builds to disable it.", + .category = category, + .handler = {[=]() { override(smRelaxed); }} + }); } void MaxBuildJobsSetting::set(const std::string & str) diff --git a/src/libstore/remote-store.cc b/src/libstore/remote-store.cc index 8c55da268..07ef79382 100644 --- a/src/libstore/remote-store.cc +++ b/src/libstore/remote-store.cc @@ -779,8 +779,10 @@ std::exception_ptr RemoteStore::Connection::processStderr(Sink * sink, Source * return std::make_exception_ptr(Error(status, error)); } - else if (msg == STDERR_NEXT) - printError(chomp(readString(from))); + else if (msg == STDERR_NEXT) { + string s = chomp(readString(from)); + printMsg(lvlVomit, "stderr %s", s); + } else if (msg == STDERR_START_ACTIVITY) { auto act = readNum<ActivityId>(from); |