aboutsummaryrefslogtreecommitdiff
path: root/src/nix/add-to-store.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2020-06-02 15:39:07 +0200
committerGitHub <noreply@github.com>2020-06-02 15:39:07 +0200
commitbfa1acd85c4d15c5ea95337138f47672659e2a9e (patch)
tree0baf08df6b477c4368861d439ceddf20fdb5fef6 /src/nix/add-to-store.cc
parentc16fdda3a6f647efe83faf874df3c1fee10c88bc (diff)
parentfac0c2d54a6b04175b40009506f2720d2594ed4e (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.cc6
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));
}