diff options
Diffstat (limited to 'src/libexpr/common-opts.cc')
-rw-r--r-- | src/libexpr/common-opts.cc | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/libexpr/common-opts.cc b/src/libexpr/common-opts.cc index bab31f4935db..d029d2ec35b9 100644 --- a/src/libexpr/common-opts.cc +++ b/src/libexpr/common-opts.cc @@ -33,5 +33,15 @@ bool parseOptionArg(const string & arg, Strings::iterator & i, return true; } - + +bool parseSearchPathArg(const string & arg, Strings::iterator & i, + const Strings::iterator & argsEnd, EvalState & state) +{ + if (arg != "-I") return false; + if (i == argsEnd) throw UsageError(format("`%1%' requires an argument") % arg);; + state.addToSearchPath(*i++); + return true; +} + + } |