diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2020-06-02 15:39:07 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-02 15:39:07 +0200 |
commit | bfa1acd85c4d15c5ea95337138f47672659e2a9e (patch) | |
tree | 0baf08df6b477c4368861d439ceddf20fdb5fef6 /src/nix/add-to-store.cc | |
parent | c16fdda3a6f647efe83faf874df3c1fee10c88bc (diff) | |
parent | fac0c2d54a6b04175b40009506f2720d2594ed4e (diff) |
Merge pull request #3639 from obsidiansystems/do-fixme-store-removes
Remove `addToStore` variant as requested by `FIXME`
Diffstat (limited to 'src/nix/add-to-store.cc')
-rw-r--r-- | src/nix/add-to-store.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/nix/add-to-store.cc b/src/nix/add-to-store.cc index 4b4ba81cb..f43f774c1 100644 --- a/src/nix/add-to-store.cc +++ b/src/nix/add-to-store.cc @@ -50,8 +50,10 @@ struct CmdAddToStore : MixDryRun, StoreCommand info.narSize = sink.s->size(); info.ca = makeFixedOutputCA(FileIngestionMethod::Recursive, info.narHash); - if (!dryRun) - store->addToStore(info, sink.s); + if (!dryRun) { + auto source = StringSource { *sink.s }; + store->addToStore(info, source); + } logger->stdout("%s", store->printStorePath(info.path)); } |