mirror of
https://github.com/NixOS/nix
synced 2025-07-06 21:41:48 +02:00
fetchToStore(): Don't always respect settings.readOnlyMode
It's now up to the caller whether readOnlyMode should be applied. In some contexts (like InputScheme::fetch()), we always need to fetch.
This commit is contained in:
parent
6162105675
commit
7cb4d0c5b7
7 changed files with 29 additions and 10 deletions
|
@ -8,12 +8,15 @@
|
|||
|
||||
namespace nix {
|
||||
|
||||
enum struct FetchMode { DryRun, Copy };
|
||||
|
||||
/**
|
||||
* Copy the `path` to the Nix store.
|
||||
*/
|
||||
StorePath fetchToStore(
|
||||
Store & store,
|
||||
const SourcePath & path,
|
||||
FetchMode mode,
|
||||
std::string_view name = "source",
|
||||
ContentAddressMethod method = FileIngestionMethod::Recursive,
|
||||
PathFilter * filter = nullptr,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue