Revert "Get rid of unicode quotes (#1140)"
This reverts commit f78126bfd6. There
really is no need for such a massive change...
This commit is contained in:
parent
f78126bfd6
commit
215b70f51e
96 changed files with 670 additions and 670 deletions
|
|
@ -13,9 +13,9 @@ struct MixCat : virtual Args
|
|||
{
|
||||
auto st = accessor->stat(path);
|
||||
if (st.type == FSAccessor::Type::tMissing)
|
||||
throw Error(format("path '%1%' does not exist") % path);
|
||||
throw Error(format("path ‘%1%’ does not exist") % path);
|
||||
if (st.type != FSAccessor::Type::tRegular)
|
||||
throw Error(format("path '%1%' is not a regular file") % path);
|
||||
throw Error(format("path ‘%1%’ is not a regular file") % path);
|
||||
|
||||
std::cout << accessor->readFile(path);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ MultiCommand::MultiCommand(const Commands & _commands)
|
|||
assert(!command);
|
||||
auto i = commands.find(ss.front());
|
||||
if (i == commands.end())
|
||||
throw UsageError(format("'%1%' is not a recognised command") % ss.front());
|
||||
throw UsageError(format("‘%1%’ is not a recognised command") % ss.front());
|
||||
command = i->second;
|
||||
}});
|
||||
}
|
||||
|
|
@ -54,7 +54,7 @@ void MultiCommand::printHelp(const string & programName, std::ostream & out)
|
|||
printTable(out, table);
|
||||
|
||||
out << "\n";
|
||||
out << "For full documentation, run 'man " << programName << "' or 'man " << programName << "-<COMMAND>'.\n";
|
||||
out << "For full documentation, run ‘man " << programName << "’ or ‘man " << programName << "-<COMMAND>’.\n";
|
||||
}
|
||||
|
||||
bool MultiCommand::processFlag(Strings::iterator & pos, Strings::iterator end)
|
||||
|
|
@ -95,7 +95,7 @@ void StorePathsCommand::run(ref<Store> store)
|
|||
{
|
||||
if (all) {
|
||||
if (storePaths.size())
|
||||
throw UsageError("'--all' does not expect arguments");
|
||||
throw UsageError("‘--all’ does not expect arguments");
|
||||
for (auto & p : store->queryAllValidPaths())
|
||||
storePaths.push_back(p);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ public:
|
|||
typedef std::map<std::string, ref<Command>> Commands;
|
||||
|
||||
/* An argument parser that supports multiple subcommands,
|
||||
i.e. '<command> <subcommand>'. */
|
||||
i.e. ‘<command> <subcommand>’. */
|
||||
class MultiCommand : virtual Args
|
||||
{
|
||||
public:
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ struct CmdCopy : StorePathsCommand
|
|||
void run(ref<Store> store, Paths storePaths) override
|
||||
{
|
||||
if (srcUri.empty() && dstUri.empty())
|
||||
throw UsageError("you must pass '--from' and/or '--to'");
|
||||
throw UsageError("you must pass ‘--from’ and/or ‘--to’");
|
||||
|
||||
ref<Store> srcStore = srcUri.empty() ? store : openStore(srcUri);
|
||||
ref<Store> dstStore = dstUri.empty() ? store : openStore(dstUri);
|
||||
|
|
@ -63,7 +63,7 @@ struct CmdCopy : StorePathsCommand
|
|||
checkInterrupt();
|
||||
|
||||
if (!dstStore->isValidPath(storePath)) {
|
||||
Activity act(*logger, lvlInfo, format("copying '%s'...") % storePath);
|
||||
Activity act(*logger, lvlInfo, format("copying ‘%s’...") % storePath);
|
||||
|
||||
copyStorePath(srcStore, dstStore, storePath);
|
||||
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ static int compatNixHash(int argc, char * * argv)
|
|||
string s = getArg(*arg, arg, end);
|
||||
ht = parseHashType(s);
|
||||
if (ht == htUnknown)
|
||||
throw UsageError(format("unknown hash type '%1%'") % s);
|
||||
throw UsageError(format("unknown hash type ‘%1%’") % s);
|
||||
}
|
||||
else if (*arg == "--to-base16") op = opTo16;
|
||||
else if (*arg == "--to-base32") op = opTo32;
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ UserEnvElems MixInstallables::evalInstallables(ref<Store> store)
|
|||
}
|
||||
|
||||
else
|
||||
throw UsageError(format("don't know what to do with '%1%'") % installable);
|
||||
throw UsageError(format("don't know what to do with ‘%1%’") % installable);
|
||||
}
|
||||
|
||||
else {
|
||||
|
|
|
|||
|
|
@ -38,9 +38,9 @@ struct MixInstallables : virtual Args
|
|||
UserEnvElems evalInstallables(ref<Store> store);
|
||||
|
||||
/* Return a value representing the Nix expression from which we
|
||||
are installing. This is either the file specified by '--file',
|
||||
or an attribute set constructed from $NIX_PATH, e.g. '{ nixpkgs
|
||||
= import ...; bla = import ...; }'. */
|
||||
are installing. This is either the file specified by ‘--file’,
|
||||
or an attribute set constructed from $NIX_PATH, e.g. ‘{ nixpkgs
|
||||
= import ...; bla = import ...; }’. */
|
||||
Value * buildSourceExpr(EvalState & state);
|
||||
|
||||
};
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ struct MixLs : virtual Args
|
|||
|
||||
auto st = accessor->stat(path);
|
||||
if (st.type == FSAccessor::Type::tMissing)
|
||||
throw Error(format("path '%1%' does not exist") % path);
|
||||
throw Error(format("path ‘%1%’ does not exist") % path);
|
||||
doPath(st, path,
|
||||
st.type == FSAccessor::Type::tDirectory ? "." : baseNameOf(path),
|
||||
showDirectory);
|
||||
|
|
|
|||
|
|
@ -71,15 +71,15 @@ struct CmdRun : StoreCommand, MixInstallables
|
|||
createDirs(tmpDir + store->storeDir);
|
||||
|
||||
if (mount(store2->realStoreDir.c_str(), (tmpDir + store->storeDir).c_str(), "", MS_BIND, 0) == -1)
|
||||
throw SysError(format("mounting '%s' on '%s'") % store2->realStoreDir % store->storeDir);
|
||||
throw SysError(format("mounting ‘%s’ on ‘%s’") % store2->realStoreDir % store->storeDir);
|
||||
|
||||
for (auto entry : readDirectory("/")) {
|
||||
Path dst = tmpDir + "/" + entry.name;
|
||||
if (pathExists(dst)) continue;
|
||||
if (mkdir(dst.c_str(), 0700) == -1)
|
||||
throw SysError(format("creating directory '%s'") % dst);
|
||||
throw SysError(format("creating directory ‘%s’") % dst);
|
||||
if (mount(("/" + entry.name).c_str(), dst.c_str(), "", MS_BIND | MS_REC, 0) == -1)
|
||||
throw SysError(format("mounting '%s' on '%s'") % ("/" + entry.name) % dst);
|
||||
throw SysError(format("mounting ‘%s’ on ‘%s’") % ("/" + entry.name) % dst);
|
||||
}
|
||||
|
||||
char * cwd = getcwd(0, 0);
|
||||
|
|
@ -87,19 +87,19 @@ struct CmdRun : StoreCommand, MixInstallables
|
|||
Finally freeCwd([&]() { free(cwd); });
|
||||
|
||||
if (chroot(tmpDir.c_str()) == -1)
|
||||
throw SysError(format("chrooting into '%s'") % tmpDir);
|
||||
throw SysError(format("chrooting into ‘%s’") % tmpDir);
|
||||
|
||||
if (chdir(cwd) == -1)
|
||||
throw SysError(format("chdir to '%s' in chroot") % cwd);
|
||||
throw SysError(format("chdir to ‘%s’ in chroot") % cwd);
|
||||
} else
|
||||
if (mount(store2->realStoreDir.c_str(), store->storeDir.c_str(), "", MS_BIND, 0) == -1)
|
||||
throw SysError(format("mounting '%s' on '%s'") % store2->realStoreDir % store->storeDir);
|
||||
throw SysError(format("mounting ‘%s’ on ‘%s’") % store2->realStoreDir % store->storeDir);
|
||||
|
||||
writeFile("/proc/self/setgroups", "deny");
|
||||
writeFile("/proc/self/uid_map", (format("%d %d %d") % uid % uid % 1).str());
|
||||
writeFile("/proc/self/gid_map", (format("%d %d %d") % gid % gid % 1).str());
|
||||
#else
|
||||
throw Error(format("mounting the Nix store on '%s' is not supported on this platform") % store->storeDir);
|
||||
throw Error(format("mounting the Nix store on ‘%s’ is not supported on this platform") % store->storeDir);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
@ -119,7 +119,7 @@ struct CmdRun : StoreCommand, MixInstallables
|
|||
setenv("PATH", concatStringsSep(":", unixPath).c_str(), 1);
|
||||
|
||||
if (execlp("bash", "bash", nullptr) == -1)
|
||||
throw SysError("unable to exec 'bash'");
|
||||
throw SysError("unable to exec ‘bash’");
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ struct CmdCopySigs : StorePathsCommand
|
|||
void run(ref<Store> store, Paths storePaths) override
|
||||
{
|
||||
if (substituterUris.empty())
|
||||
throw UsageError("you must specify at least one substituter using '-s'");
|
||||
throw UsageError("you must specify at least one substituter using ‘-s’");
|
||||
|
||||
// FIXME: factor out commonality with MixVerify.
|
||||
std::vector<ref<Store>> substituters;
|
||||
|
|
@ -45,7 +45,7 @@ struct CmdCopySigs : StorePathsCommand
|
|||
logger->setExpected(doneLabel, storePaths.size());
|
||||
|
||||
auto doPath = [&](const Path & storePath) {
|
||||
Activity act(*logger, lvlInfo, format("getting signatures for '%s'") % storePath);
|
||||
Activity act(*logger, lvlInfo, format("getting signatures for ‘%s’") % storePath);
|
||||
|
||||
checkInterrupt();
|
||||
|
||||
|
|
@ -112,7 +112,7 @@ struct CmdSignPaths : StorePathsCommand
|
|||
void run(ref<Store> store, Paths storePaths) override
|
||||
{
|
||||
if (secretKeyFile.empty())
|
||||
throw UsageError("you must specify a secret key file using '-k'");
|
||||
throw UsageError("you must specify a secret key file using ‘-k’");
|
||||
|
||||
SecretKey secretKey(readFile(secretKeyFile));
|
||||
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ struct CmdVerify : StorePathsCommand
|
|||
try {
|
||||
checkInterrupt();
|
||||
|
||||
Activity act(*logger, lvlInfo, format("checking '%s'") % storePath);
|
||||
Activity act(*logger, lvlInfo, format("checking ‘%s’") % storePath);
|
||||
|
||||
auto info = store->queryPathInfo(storePath);
|
||||
|
||||
|
|
@ -88,7 +88,7 @@ struct CmdVerify : StorePathsCommand
|
|||
logger->incProgress(corruptedLabel);
|
||||
corrupted = 1;
|
||||
printError(
|
||||
format("path '%s' was modified! expected hash '%s', got '%s'")
|
||||
format("path ‘%s’ was modified! expected hash ‘%s’, got ‘%s’")
|
||||
% info->path % printHash(info->narHash) % printHash(hash.first));
|
||||
}
|
||||
|
||||
|
|
@ -139,7 +139,7 @@ struct CmdVerify : StorePathsCommand
|
|||
if (!good) {
|
||||
logger->incProgress(untrustedLabel);
|
||||
untrusted++;
|
||||
printError(format("path '%s' is untrusted") % info->path);
|
||||
printError(format("path ‘%s’ is untrusted") % info->path);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue