* Print out the offending path.

This commit is contained in:
Eelco Dolstra 2006-10-17 14:01:28 +00:00
parent 58ff6939f4
commit 4bd5cdb90b

View file

@ -572,9 +572,10 @@ Expr evalExpr2(EvalState & state, Expr e)
ATerm p; ATerm p;
if (matchAttrs(e1, as) && matchPath(e2, p)) { if (matchAttrs(e1, as) && matchPath(e2, p)) {
static bool haveWarned = false; static bool haveWarned = false;
warnOnce(haveWarned, warnOnce(haveWarned, format(
"concatenation of a derivation and a path is deprecated, " "concatenation of a derivation and a path is deprecated, "
"you should write `drv + \"/path\"' instead of `drv + /path'"); "you should write `drv + \"%1%\"' instead of `drv + %1%'")
% aterm2String(p));
PathSet context; PathSet context;
return makeStr( return makeStr(
coerceToString(state, makeSelect(e1, toATerm("outPath")), context) coerceToString(state, makeSelect(e1, toATerm("outPath")), context)