mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-24 06:56:14 +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();
|
||||
if (s.find((char) 0) != std::string::npos)
|
||||
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 =
|
||||
#if 0
|
||||
state.store->isInStore(path) ?
|
||||
state.store->queryPathInfo(state.store->toStorePath(path).first)->references :
|
||||
#endif
|
||||
state.store->isInStore(path.path) ?
|
||||
state.store->queryPathInfo(state.store->toStorePath(path.path).first)->references :
|
||||
StorePathSet{};
|
||||
auto context = state.store->printStorePathSet(refs);
|
||||
v.mkString(s, context);
|
||||
|
|
Loading…
Reference in a new issue