forked from lix-project/lix
Fix error message
This fixes the error message error: file `' was not found in the Nix search path (add it using $NIX_PATH or -I)
This commit is contained in:
parent
d5a5a83ad4
commit
e9fc91df45
|
@ -47,9 +47,10 @@ bool parseSearchPathArg(const string & arg, Strings::iterator & i,
|
||||||
Path lookupFileArg(EvalState & state, string s)
|
Path lookupFileArg(EvalState & state, string s)
|
||||||
{
|
{
|
||||||
if (s.size() > 2 && s.at(0) == '<' && s.at(s.size() - 1) == '>') {
|
if (s.size() > 2 && s.at(0) == '<' && s.at(s.size() - 1) == '>') {
|
||||||
Path p = state.findFile(s.substr(1, s.size() - 2));
|
Path p = s.substr(1, s.size() - 2);
|
||||||
if (p == "") throw Error(format("file `%1%' was not found in the Nix search path (add it using $NIX_PATH or -I)") % p);
|
Path p2 = state.findFile(p);
|
||||||
return p;
|
if (p2 == "") throw Error(format("file `%1%' was not found in the Nix search path (add it using $NIX_PATH or -I)") % p);
|
||||||
|
return p2;
|
||||||
} else
|
} else
|
||||||
return absPath(s);
|
return absPath(s);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue