mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-14 10:16:15 +02:00
Fix readfile-context.sh
This commit is contained in:
parent
bacf83e953
commit
00b0fb27c1
1 changed files with 3 additions and 4 deletions
|
@ -1460,11 +1460,10 @@ static void prim_readFile(EvalState & state, const Pos & pos, Value * * args, Va
|
||||||
auto s = path.readFile();
|
auto s = path.readFile();
|
||||||
if (s.find((char) 0) != std::string::npos)
|
if (s.find((char) 0) != std::string::npos)
|
||||||
throw Error("the contents of the file '%1%' cannot be represented as a Nix string", path);
|
throw Error("the contents of the file '%1%' cannot be represented as a Nix string", path);
|
||||||
|
// FIXME: only do queryPathInfo if path.accessor is the store accessor
|
||||||
auto refs =
|
auto refs =
|
||||||
#if 0
|
state.store->isInStore(path.path) ?
|
||||||
state.store->isInStore(path) ?
|
state.store->queryPathInfo(state.store->toStorePath(path.path).first)->references :
|
||||||
state.store->queryPathInfo(state.store->toStorePath(path).first)->references :
|
|
||||||
#endif
|
|
||||||
StorePathSet{};
|
StorePathSet{};
|
||||||
auto context = state.store->printStorePathSet(refs);
|
auto context = state.store->printStorePathSet(refs);
|
||||||
v.mkString(s, context);
|
v.mkString(s, context);
|
||||||
|
|
Loading…
Reference in a new issue