mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-11 00:36:20 +02:00
don't add underscore names to extras
This commit is contained in:
parent
e5eebda194
commit
d0d5890445
1 changed files with 25 additions and 9 deletions
|
@ -717,7 +717,6 @@ void mapStaticEnvBindings(const StaticEnv &se, const Env &env, valmap & vm)
|
|||
// override the higher levels.
|
||||
if (env.up && se.up) {
|
||||
mapStaticEnvBindings( *se.up, *env.up,vm);
|
||||
}
|
||||
|
||||
// iterate through staticenv bindings and add them.
|
||||
auto map = valmap();
|
||||
|
@ -727,7 +726,24 @@ void mapStaticEnvBindings(const StaticEnv &se, const Env &env, valmap & vm)
|
|||
}
|
||||
|
||||
vm.merge(map);
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cout << " -------------------- " << std::endl;
|
||||
// iterate through staticenv bindings and add them,
|
||||
// except for the __* ones.
|
||||
auto map = valmap();
|
||||
for (auto iter = se.vars.begin(); iter != se.vars.end(); ++iter)
|
||||
{
|
||||
std::cout << iter->first << std::endl;
|
||||
std::string s = iter->first;
|
||||
if (s.substr(0,2) != "__") {
|
||||
map[iter->first] = env.values[iter->second];
|
||||
}
|
||||
}
|
||||
|
||||
vm.merge(map);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue