diff options
Diffstat (limited to 'src/libexpr/parser.y')
-rw-r--r-- | src/libexpr/parser.y | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libexpr/parser.y b/src/libexpr/parser.y index 8a084fea0..dc995db00 100644 --- a/src/libexpr/parser.y +++ b/src/libexpr/parser.y @@ -608,7 +608,7 @@ Expr * EvalState::parseExprFromString(const string & s, const Path & basePath) } -void EvalState::addToSearchPath(const string & s) + void EvalState::addToSearchPath(const string & s, bool warn) { size_t pos = s.find('='); string prefix; @@ -624,7 +624,8 @@ void EvalState::addToSearchPath(const string & s) if (pathExists(path)) { debug(format("adding path `%1%' to the search path") % path); searchPath.insert(searchPathInsertionPoint, std::pair<string, Path>(prefix, path)); - } + } else if (warn) + printMsg(lvlError, format("warning: Nix search path entry `%1%' does not exist, ignoring") % path); } |