mirror of
https://github.com/NixOS/nix
synced 2025-06-28 17:51:15 +02:00
Warn about missing -I paths
Fixes #121. Note that we don't warn about missing $NIX_PATH entries because it's intended that some may be missing (cf. the default $NIX_PATH on NixOS, which includes paths like /etc/nixos/nixpkgs for backward compatibility).
This commit is contained in:
parent
733214144a
commit
f14ef84a51
3 changed files with 6 additions and 5 deletions
|
@ -13,7 +13,7 @@ bool parseOptionArg(const string & arg, Strings::iterator & i,
|
|||
if (arg != "--arg" && arg != "--argstr") return false;
|
||||
|
||||
UsageError error(format("`%1%' requires two arguments") % arg);
|
||||
|
||||
|
||||
if (i == argsEnd) throw error;
|
||||
string name = *i++;
|
||||
if (i == argsEnd) throw error;
|
||||
|
@ -39,7 +39,7 @@ bool parseSearchPathArg(const string & arg, Strings::iterator & i,
|
|||
{
|
||||
if (arg != "-I") return false;
|
||||
if (i == argsEnd) throw UsageError(format("`%1%' requires an argument") % arg);;
|
||||
state.addToSearchPath(*i++);
|
||||
state.addToSearchPath(*i++, true);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue