1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-25 06:31:14 +02:00

flakes: fix boolean and int nixConfig values

Some type confusion was causing ints to be pointers, and bools
to be ints. Fixes #5621
This commit is contained in:
Yorick van Pelt 2021-11-22 13:29:49 +01:00
parent 9cd8cffefc
commit bd628cf3da
No known key found for this signature in database
GPG key ID: D8D3CC6D951384DE
2 changed files with 5 additions and 5 deletions

View file

@ -254,7 +254,7 @@ static Flake getFlake(
else if (setting.value->type() == nInt)
flake.config.settings.insert({setting.name, state.forceInt(*setting.value, *setting.pos)});
else if (setting.value->type() == nBool)
flake.config.settings.insert({setting.name, state.forceBool(*setting.value, *setting.pos)});
flake.config.settings.insert({setting.name, Explicit<bool> { state.forceBool(*setting.value, *setting.pos) }});
else if (setting.value->type() == nList) {
std::vector<std::string> ss;
for (unsigned int n = 0; n < setting.value->listSize(); ++n) {