diff options
author | Guillaume Maudoux <layus.on@gmail.com> | 2016-11-25T14·48+0100 |
---|---|---|
committer | Domen Kožar <domen@dev.si> | 2016-11-25T14·48+0100 |
commit | f78126bfd6b6c8477fcdbc09b2f98772dbe9a1e7 (patch) | |
tree | 23a76a33f21ce39184bcbdcd28cb937d15968ce7 /src/libexpr/eval.cc | |
parent | 7ee43df8622cc0589d54248fb44cebe1c1d991d2 (diff) |
Get rid of unicode quotes (#1140)
Diffstat (limited to 'src/libexpr/eval.cc')
-rw-r--r-- | src/libexpr/eval.cc | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/src/libexpr/eval.cc b/src/libexpr/eval.cc index 64f3874db614..0b8f07fbfa9c 100644 --- a/src/libexpr/eval.cc +++ b/src/libexpr/eval.cc @@ -330,7 +330,7 @@ Path EvalState::checkSourcePath(const Path & path_) if (!restricted) return path_; /* Resolve symlinks. */ - debug(format("checking access to ‘%s’") % path_); + debug(format("checking access to '%s'") % path_); Path path = canonPath(path_, true); for (auto & i : searchPath) { @@ -352,7 +352,7 @@ Path EvalState::checkSourcePath(const Path & path_) return path; #endif - throw RestrictedPathError(format("access to path ‘%1%’ is forbidden in restricted mode") % path_); + throw RestrictedPathError(format("access to path '%1%' is forbidden in restricted mode") % path_); } @@ -505,7 +505,7 @@ inline Value * EvalState::lookupVar(Env * env, const ExprVar & var, bool noEval) return j->value; } if (!env->prevWith) - throwUndefinedVarError("undefined variable ‘%1%’ at %2%", var.name, var.pos); + throwUndefinedVarError("undefined variable '%1%' at %2%", var.name, var.pos); for (unsigned int l = env->prevWith; l; --l, env = env->up) ; } } @@ -644,12 +644,12 @@ void EvalState::evalFile(const Path & path, Value & v) return; } - Activity act(*logger, lvlTalkative, format("evaluating file ‘%1%’") % path2); + Activity act(*logger, lvlTalkative, format("evaluating file '%1%'") % path2); Expr * e = parseExprFromFile(checkSourcePath(path2)); try { eval(e, v); } catch (Error & e) { - addErrorPrefix(e, "while evaluating the file ‘%1%’:\n", path2); + addErrorPrefix(e, "while evaluating the file '%1%':\n", path2); throw; } @@ -799,7 +799,7 @@ void ExprAttrs::eval(EvalState & state, Env & env, Value & v) Symbol nameSym = state.symbols.create(nameVal.string.s); Bindings::iterator j = v.attrs->find(nameSym); if (j != v.attrs->end()) - throwEvalError("dynamic attribute ‘%1%’ at %2% already defined at %3%", nameSym, i.pos, *j->pos); + throwEvalError("dynamic attribute '%1%' at %2% already defined at %3%", nameSym, i.pos, *j->pos); i.valueExpr->setName(nameSym); /* Keep sorted order so find can catch duplicates */ @@ -887,7 +887,7 @@ void ExprSelect::eval(EvalState & state, Env & env, Value & v) } else { state.forceAttrs(*vAttrs, pos); if ((j = vAttrs->attrs->find(name)) == vAttrs->attrs->end()) - throwEvalError("attribute ‘%1%’ missing, at %2%", name, pos); + throwEvalError("attribute '%1%' missing, at %2%", name, pos); } vAttrs = j->value; pos2 = j->pos; @@ -898,7 +898,7 @@ void ExprSelect::eval(EvalState & state, Env & env, Value & v) } catch (Error & e) { if (pos2 && pos2->file != state.sDerivationNix) - addErrorPrefix(e, "while evaluating the attribute ‘%1%’ at %2%:\n", + addErrorPrefix(e, "while evaluating the attribute '%1%' at %2%:\n", showAttrPath(state, env, attrPath), *pos2); throw; } @@ -1040,7 +1040,7 @@ void EvalState::callFunction(Value & fun, Value & arg, Value & v, const Pos & po for (auto & i : lambda.formals->formals) { Bindings::iterator j = arg.attrs->find(i.name); if (j == arg.attrs->end()) { - if (!i.def) throwTypeError("%1% called without required argument ‘%2%’, at %3%", + if (!i.def) throwTypeError("%1% called without required argument '%2%', at %3%", lambda, i.name, pos); env2.values[displ++] = i.def->maybeThunk(*this, env2); } else { @@ -1056,7 +1056,7 @@ void EvalState::callFunction(Value & fun, Value & arg, Value & v, const Pos & po user. */ for (auto & i : *arg.attrs) if (lambda.formals->argNames.find(i.name) == lambda.formals->argNames.end()) - throwTypeError("%1% called with unexpected argument ‘%2%’, at %3%", lambda, i.name, pos); + throwTypeError("%1% called with unexpected argument '%2%', at %3%", lambda, i.name, pos); abort(); // can't happen } } @@ -1114,7 +1114,7 @@ void EvalState::autoCallFunction(Bindings & args, Value & fun, Value & res) if (j != args.end()) actualArgs->attrs->push_back(*j); else if (!i.def) - throwTypeError("cannot auto-call a function that has an argument without a default value (‘%1%’)", i.name); + throwTypeError("cannot auto-call a function that has an argument without a default value ('%1%')", i.name); } actualArgs->attrs->sort(); @@ -1343,7 +1343,7 @@ void EvalState::forceValueDeep(Value & v) try { recurse(*i.value); } catch (Error & e) { - addErrorPrefix(e, "while evaluating the attribute ‘%1%’ at %2%:\n", i.name, *i.pos); + addErrorPrefix(e, "while evaluating the attribute '%1%' at %2%:\n", i.name, *i.pos); throw; } } @@ -1435,10 +1435,10 @@ string EvalState::forceStringNoCtx(Value & v, const Pos & pos) string s = forceString(v, pos); if (v.string.context) { if (pos) - throwEvalError("the string ‘%1%’ is not allowed to refer to a store path (such as ‘%2%’), at %3%", + throwEvalError("the string '%1%' is not allowed to refer to a store path (such as '%2%'), at %3%", v.string.s, v.string.context[0], pos); else - throwEvalError("the string ‘%1%’ is not allowed to refer to a store path (such as ‘%2%’)", + throwEvalError("the string '%1%' is not allowed to refer to a store path (such as '%2%')", v.string.s, v.string.context[0]); } return s; @@ -1520,7 +1520,7 @@ string EvalState::coerceToString(const Pos & pos, Value & v, PathSet & context, string EvalState::copyPathToStore(PathSet & context, const Path & path) { if (nix::isDerivation(path)) - throwEvalError("file names are not allowed to end in ‘%1%’", drvExtension); + throwEvalError("file names are not allowed to end in '%1%'", drvExtension); Path dstPath; if (srcToStore[path] != "") @@ -1530,7 +1530,7 @@ string EvalState::copyPathToStore(PathSet & context, const Path & path) ? store->computeStorePathForPath(checkSourcePath(path)).first : store->addToStore(baseNameOf(path), checkSourcePath(path), true, htSHA256, defaultPathFilter, repair); srcToStore[path] = dstPath; - printMsg(lvlChatty, format("copied source ‘%1%’ -> ‘%2%’") + printMsg(lvlChatty, format("copied source '%1%' -> '%2%'") % path % dstPath); } @@ -1543,7 +1543,7 @@ Path EvalState::coerceToPath(const Pos & pos, Value & v, PathSet & context) { string path = coerceToString(pos, v, context, false, false); if (path == "" || path[0] != '/') - throwEvalError("string ‘%1%’ doesn't represent an absolute path, at %2%", path, pos); + throwEvalError("string '%1%' doesn't represent an absolute path, at %2%", path, pos); return path; } |