aboutsummaryrefslogtreecommitdiff
path: root/src/libcmd
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2023-03-17 10:33:48 -0400
committerJohn Ericson <John.Ericson@Obsidian.Systems>2023-03-20 11:05:22 -0400
commit296831f641b2ce43f179ec710c3ef76726ef96e2 (patch)
tree0550fd1030c454648dd3acb57db5d3a056a20ac7 /src/libcmd
parent1b6c96bbcb23ecee5078b1fd56a5b0e83b40b158 (diff)
Move enabled experimental feature to libutil struct
This is needed in subsequent commits to allow the settings and CLI args infrastructure itself to read this setting.
Diffstat (limited to 'src/libcmd')
-rw-r--r--src/libcmd/common-eval-args.cc2
-rw-r--r--src/libcmd/installables.cc2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/libcmd/common-eval-args.cc b/src/libcmd/common-eval-args.cc
index 908127b4d..a954a8c6f 100644
--- a/src/libcmd/common-eval-args.cc
+++ b/src/libcmd/common-eval-args.cc
@@ -166,7 +166,7 @@ Path lookupFileArg(EvalState & state, std::string_view s)
}
else if (hasPrefix(s, "flake:")) {
- settings.requireExperimentalFeature(Xp::Flakes);
+ experimentalFeatureSettings.require(Xp::Flakes);
auto flakeRef = parseFlakeRef(std::string(s.substr(6)), {}, true, false);
auto storePath = flakeRef.resolve(state.store).fetchTree(state.store).first.storePath;
return state.store->toRealPath(storePath);
diff --git a/src/libcmd/installables.cc b/src/libcmd/installables.cc
index 5cbf26b88..cf2096984 100644
--- a/src/libcmd/installables.cc
+++ b/src/libcmd/installables.cc
@@ -332,7 +332,7 @@ void completeFlakeRefWithFragment(
void completeFlakeRef(ref<Store> store, std::string_view prefix)
{
- if (!settings.isExperimentalFeatureEnabled(Xp::Flakes))
+ if (!experimentalFeatureSettings.isEnabled(Xp::Flakes))
return;
if (prefix == "")