mirror of
https://github.com/NixOS/nix
synced 2025-06-30 07:33:16 +02:00
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.
This commit is contained in:
parent
1b6c96bbcb
commit
296831f641
28 changed files with 113 additions and 70 deletions
|
@ -166,18 +166,6 @@ StringSet Settings::getDefaultExtraPlatforms()
|
|||
return extraPlatforms;
|
||||
}
|
||||
|
||||
bool Settings::isExperimentalFeatureEnabled(const ExperimentalFeature & feature)
|
||||
{
|
||||
auto & f = experimentalFeatures.get();
|
||||
return std::find(f.begin(), f.end(), feature) != f.end();
|
||||
}
|
||||
|
||||
void Settings::requireExperimentalFeature(const ExperimentalFeature & feature)
|
||||
{
|
||||
if (!isExperimentalFeatureEnabled(feature))
|
||||
throw MissingExperimentalFeature(feature);
|
||||
}
|
||||
|
||||
bool Settings::isWSL1()
|
||||
{
|
||||
struct utsname utsbuf;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue