1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-26 07:31:15 +02:00

Get rid of unicode quotes (#1140)

This commit is contained in:
Guillaume Maudoux 2016-11-25 15:48:27 +01:00 committed by Domen Kožar
parent 7ee43df862
commit f78126bfd6
96 changed files with 670 additions and 670 deletions

View file

@ -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;
}