forked from lix-project/lix
Merge pull request #4361 from tweag/fix-binary-caches-addTextToStore
Fix `addTextToStore` for binary caches
This commit is contained in:
commit
e3ddffb27e
|
@ -433,7 +433,9 @@ StorePath BinaryCacheStore::addTextToStore(const string & name, const string & s
|
||||||
if (!repair && isValidPath(path))
|
if (!repair && isValidPath(path))
|
||||||
return path;
|
return path;
|
||||||
|
|
||||||
auto source = StringSource { s };
|
StringSink sink;
|
||||||
|
dumpString(s, sink);
|
||||||
|
auto source = StringSource { *sink.s };
|
||||||
return addToStoreCommon(source, repair, CheckSigs, [&](HashResult nar) {
|
return addToStoreCommon(source, repair, CheckSigs, [&](HashResult nar) {
|
||||||
ValidPathInfo info { path, nar.first };
|
ValidPathInfo info { path, nar.first };
|
||||||
info.narSize = nar.second;
|
info.narSize = nar.second;
|
||||||
|
|
Loading…
Reference in a new issue