forked from lix-project/lix
exportReferencesGraph: Only export in JSON format when in structured mode
This prevents breaking compatibility with builders that read "closure.*", since they would accidentally pick up the new JSON files.
This commit is contained in:
parent
7a65b2470e
commit
1351b0df87
|
@ -2276,18 +2276,24 @@ void DerivationGoal::doExportReferencesGraph()
|
|||
}
|
||||
}
|
||||
|
||||
if (!drv->env.count("__json")) {
|
||||
|
||||
/* Write closure info to <fileName>. */
|
||||
writeFile(tmpDir + "/" + fileName,
|
||||
worker.store.makeValidityRegistration(paths, false, false));
|
||||
|
||||
} else {
|
||||
|
||||
/* Write a more comprehensive JSON serialisation to
|
||||
<fileName>.json. */
|
||||
<fileName>. */
|
||||
std::ostringstream str;
|
||||
{
|
||||
JSONPlaceholder jsonRoot(str, true);
|
||||
worker.store.pathInfoToJSON(jsonRoot, paths, false, true);
|
||||
}
|
||||
writeFile(tmpDir + "/" + fileName + ".json", str.str());
|
||||
writeFile(tmpDir + "/" + fileName, str.str());
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue