mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-23 06:26:15 +02:00
Make queryJSON not bail immediately on an assertion or error
This commit is contained in:
parent
6ff2ce8caf
commit
61f02f7f20
1 changed files with 33 additions and 25 deletions
|
@ -911,6 +911,9 @@ static void queryJSON(Globals & globals, vector<DrvInfo> & elems, bool printOutP
|
|||
{
|
||||
JSONObject topObj(cout, true);
|
||||
for (auto & i : elems) {
|
||||
try {
|
||||
if (i.hasFailed()) continue;
|
||||
|
||||
JSONObject pkgObj = topObj.object(i.attrPath);
|
||||
|
||||
auto drvName = DrvName(i.queryName());
|
||||
|
@ -942,6 +945,11 @@ static void queryJSON(Globals & globals, vector<DrvInfo> & elems, bool printOutP
|
|||
}
|
||||
}
|
||||
}
|
||||
} catch (AssertionError & e) {
|
||||
printMsg(lvlTalkative, "skipping derivation named '%1%' which gives an assertion failure", i.queryName());
|
||||
} catch (Error & e) {
|
||||
printMsg(lvlError, "skipping derivation named '%1%' which gives an error '%2%'", i.queryName(), e.msg());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue