mirror of
https://github.com/NixOS/nix
synced 2025-06-27 16:51:15 +02:00
Use Value::normalType on all forced values instead of Value::type
This commit is contained in:
parent
9f056f7afd
commit
22ead43a0b
15 changed files with 199 additions and 213 deletions
|
@ -97,10 +97,10 @@ struct CmdEval : MixJSON, InstallableCommand
|
|||
recurse = [&](Value & v, const Pos & pos, const Path & path)
|
||||
{
|
||||
state->forceValue(v);
|
||||
if (v.type == tString)
|
||||
if (v.normalType() == nString)
|
||||
// FIXME: disallow strings with contexts?
|
||||
writeFile(path, v.string.s);
|
||||
else if (v.type == tAttrs) {
|
||||
else if (v.normalType() == nAttrs) {
|
||||
if (mkdir(path.c_str(), 0777) == -1)
|
||||
throw SysError("creating directory '%s'", path);
|
||||
for (auto & attr : *v.attrs)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue