aboutsummaryrefslogtreecommitdiff
path: root/src/nix/add-to-store.cc
diff options
context:
space:
mode:
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 dc34a83ca..b92597cc2 100644
--- a/src/nix/add-to-store.cc
+++ b/src/nix/add-to-store.cc
@@ -53,8 +53,10 @@ struct CmdAddToStore : MixDryRun, StoreCommand
.hash = 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));
}