diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2020-06-02 16:07:25 +0000 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2020-06-02 16:07:25 +0000 |
commit | 64cffb804ade911167d71e033c5c83d9c8300651 (patch) | |
tree | 75403238922ce219110be5fe24995163d49ca08b /src/nix | |
parent | 450dcf2c1b60a36f5ffeab2411805287d122bcdd (diff) | |
parent | bfa1acd85c4d15c5ea95337138f47672659e2a9e (diff) |
Merge remote-tracking branch 'upstream/master' into no-hash-type-unknown
Diffstat (limited to 'src/nix')
-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 39d49721a..3c0f7cdd6 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)); } |