mirror of
https://github.com/NixOS/nix
synced 2025-06-29 02:11:15 +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
|
@ -45,7 +45,7 @@ ref<InstallableValue> InstallableValue::require(ref<Installable> installable)
|
|||
std::optional<DerivedPathWithInfo> InstallableValue::trySinglePathToDerivedPaths(Value & v, const PosIdx pos, std::string_view errorCtx)
|
||||
{
|
||||
if (v.type() == nPath) {
|
||||
auto storePath = fetchToStore(*state->store, v.path());
|
||||
auto storePath = fetchToStore(*state->store, v.path(), FetchMode::Copy);
|
||||
return {{
|
||||
.path = DerivedPath::Opaque {
|
||||
.path = std::move(storePath),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue