mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-10 08:16:15 +02:00
builtins.storePath: Try to substitute the path if it is not yet valid
Signed-off-by: Shea Levy <shea@shealevy.com>
This commit is contained in:
parent
a6add93d73
commit
22d665019a
1 changed files with 2 additions and 2 deletions
|
@ -582,8 +582,8 @@ static void prim_storePath(EvalState & state, Value * * args, Value & v)
|
||||||
if (!isInStore(path))
|
if (!isInStore(path))
|
||||||
throw EvalError(format("path `%1%' is not in the Nix store") % path);
|
throw EvalError(format("path `%1%' is not in the Nix store") % path);
|
||||||
Path path2 = toStorePath(path);
|
Path path2 = toStorePath(path);
|
||||||
if (!store->isValidPath(path2))
|
if (!settings.readOnlyMode)
|
||||||
throw EvalError(format("store path `%1%' is not valid") % path2);
|
store->ensurePath(path2);
|
||||||
context.insert(path2);
|
context.insert(path2);
|
||||||
mkString(v, path, context);
|
mkString(v, path, context);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue