aboutsummaryrefslogtreecommitdiff
path: root/src/nix/add-to-store.cc
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2020-06-02 14:31:18 +0000
committerJohn Ericson <John.Ericson@Obsidian.Systems>2020-06-02 14:31:18 +0000
commit1b6461f671b5ad8475c6f30f82d8fc9422746508 (patch)
treeab3d3831ffe979f3673fd1071c59f33fb680933e /src/nix/add-to-store.cc
parentefcd30da891eccdb3518e9c07afc6f907e9ac5e6 (diff)
parentbfa1acd85c4d15c5ea95337138f47672659e2a9e (diff)
Merge remote-tracking branch 'upstream/master' into validPathInfo-ca-proper-datatype
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));
}