Merge pull request #4361 from tweag/fix-binary-caches-addTextToStore

Fix `addTextToStore` for binary caches
This commit is contained in:
Eelco Dolstra
2020-12-15 12:23:10 +01:00
committed by GitHub
+3 -1
View File
@@ -433,7 +433,9 @@ StorePath BinaryCacheStore::addTextToStore(const string & name, const string & s
if (!repair && isValidPath(path))
return path;
auto source = StringSource { s };
StringSink sink;
dumpString(s, sink);
auto source = StringSource { *sink.s };
return addToStoreCommon(source, repair, CheckSigs, [&](HashResult nar) {
ValidPathInfo info { path, nar.first };
info.narSize = nar.second;