diff options
author | Robert Hensing <robert@roberthensing.nl> | 2023-05-19 10:03:25 +0200 |
---|---|---|
committer | Robert Hensing <robert@roberthensing.nl> | 2023-06-30 18:19:56 +0200 |
commit | 7e5b6d2c4550a3007946271768e114531d7b89f0 (patch) | |
tree | 7d07ea3295cde93bf0daee6c7d4edf1f26b68f7f /src | |
parent | 0f6d596df5866d3f08e743ac0f1a282daf6b2155 (diff) |
fetchClosure: Refactor: rename toCA -> enableRewriting
Diffstat (limited to 'src')
-rw-r--r-- | src/libexpr/primops/fetchClosure.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libexpr/primops/fetchClosure.cc b/src/libexpr/primops/fetchClosure.cc index 26c2b90bf..8f8e033a5 100644 --- a/src/libexpr/primops/fetchClosure.cc +++ b/src/libexpr/primops/fetchClosure.cc @@ -11,7 +11,7 @@ static void prim_fetchClosure(EvalState & state, const PosIdx pos, Value * * arg std::optional<std::string> fromStoreUrl; std::optional<StorePath> fromPath; - bool toCA = false; + bool enableRewriting = false; std::optional<StorePath> toPath; for (auto & attr : *args[0]->attrs) { @@ -27,7 +27,7 @@ static void prim_fetchClosure(EvalState & state, const PosIdx pos, Value * * arg else if (attrName == "toPath") { state.forceValue(*attr.value, attr.pos); - toCA = true; + enableRewriting = true; if (attr.value->type() != nString || attr.value->string.s != std::string("")) { NixStringContext context; toPath = state.coerceToStorePath(attr.pos, *attr.value, context, attrHint()); @@ -75,7 +75,7 @@ static void prim_fetchClosure(EvalState & state, const PosIdx pos, Value * * arg auto fromStore = openStore(parsedURL.to_string()); - if (toCA) { + if (enableRewriting) { if (!toPath || !state.store->isValidPath(*toPath)) { auto remappings = makeContentAddressed(*fromStore, *state.store, { *fromPath }); auto i = remappings.find(*fromPath); |