1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-28 17:51:15 +02:00

Ensure that -I flags get included in nixPath

Also fixes #261.
This commit is contained in:
Eelco Dolstra 2014-05-26 16:50:36 +02:00
parent a8edf185a9
commit 39d72640c2
8 changed files with 33 additions and 18 deletions

View file

@ -35,11 +35,11 @@ bool parseOptionArg(const string & arg, Strings::iterator & i,
bool parseSearchPathArg(const string & arg, Strings::iterator & i,
const Strings::iterator & argsEnd, EvalState & state)
const Strings::iterator & argsEnd, Strings & searchPath)
{
if (arg != "-I") return false;
if (i == argsEnd) throw UsageError(format("`%1%' requires an argument") % arg);;
state.addToSearchPath(*i++, true);
searchPath.push_back(*i++);
return true;
}