aboutsummaryrefslogtreecommitdiff
path: root/src/nix
diff options
context:
space:
mode:
authorJörg Thalheim <joerg@thalheim.io>2017-07-30 12:27:57 +0100
committerJörg Thalheim <joerg@thalheim.io>2017-07-30 12:32:45 +0100
commit2fd8f8bb99a2832b3684878c020ba47322e79332 (patch)
tree65a667fbc746f4ff8efcaca3c0a58565985f26a5 /src/nix
parentc7654bc491d9ce7c1fbadecd7769418fa79a2060 (diff)
Replace Unicode quotes in user-facing strings by ASCII
Relevant RFC: NixOS/rfcs#4 $ ag -l | xargs sed -i -e "/\"/s/’/'/g;/\"/s/‘/'/g"
Diffstat (limited to 'src/nix')
-rw-r--r--src/nix/cat.cc4
-rw-r--r--src/nix/command.cc6
-rw-r--r--src/nix/command.hh4
-rw-r--r--src/nix/copy.cc2
-rw-r--r--src/nix/edit.cc6
-rw-r--r--src/nix/hash.cc2
-rw-r--r--src/nix/installables.cc2
-rw-r--r--src/nix/log.cc2
-rw-r--r--src/nix/ls.cc2
-rw-r--r--src/nix/main.cc6
-rw-r--r--src/nix/repl.cc4
-rw-r--r--src/nix/run.cc16
-rw-r--r--src/nix/search.cc8
-rw-r--r--src/nix/sigs.cc6
-rw-r--r--src/nix/verify.cc6
15 files changed, 38 insertions, 38 deletions
diff --git a/src/nix/cat.cc b/src/nix/cat.cc
index 2405a8cb4..a35f640d8 100644
--- a/src/nix/cat.cc
+++ b/src/nix/cat.cc
@@ -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);
}
diff --git a/src/nix/command.cc b/src/nix/command.cc
index 6b608a708..e88c834ab 100644
--- a/src/nix/command.cc
+++ b/src/nix/command.cc
@@ -28,7 +28,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;
}});
}
@@ -55,7 +55,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)
@@ -109,7 +109,7 @@ void StorePathsCommand::run(ref<Store> store)
if (all) {
if (installables.size())
- throw UsageError("‘--all’ does not expect arguments");
+ throw UsageError("'--all' does not expect arguments");
for (auto & p : store->queryAllValidPaths())
storePaths.push_back(p);
}
diff --git a/src/nix/command.hh b/src/nix/command.hh
index 536802653..b159408c3 100644
--- a/src/nix/command.hh
+++ b/src/nix/command.hh
@@ -53,12 +53,12 @@ struct Installable
virtual Buildables toBuildable()
{
- throw Error("argument ‘%s’ cannot be built", what());
+ throw Error("argument '%s' cannot be built", what());
}
virtual Value * toValue(EvalState & state)
{
- throw Error("argument ‘%s’ cannot be evaluated", what());
+ throw Error("argument '%s' cannot be evaluated", what());
}
};
diff --git a/src/nix/copy.cc b/src/nix/copy.cc
index b2165cb8f..9f1a80d07 100644
--- a/src/nix/copy.cc
+++ b/src/nix/copy.cc
@@ -46,7 +46,7 @@ struct CmdCopy : StorePathsCommand
void run(ref<Store> srcStore, 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> dstStore = dstUri.empty() ? openStore() : openStore(dstUri);
diff --git a/src/nix/edit.cc b/src/nix/edit.cc
index 632b55577..5cf9c7200 100644
--- a/src/nix/edit.cc
+++ b/src/nix/edit.cc
@@ -41,7 +41,7 @@ struct CmdEdit : InstallablesCommand
auto dummyArgs = state->allocBindings(0);
v2 = findAlongAttrPath(*state, "meta.position", *dummyArgs, *v);
} catch (Error &) {
- throw Error("package ‘%s’ has no source location information", i->what());
+ throw Error("package '%s' has no source location information", i->what());
}
auto pos = state->forceString(*v2);
@@ -49,7 +49,7 @@ struct CmdEdit : InstallablesCommand
auto colon = pos.rfind(':');
if (colon == std::string::npos)
- throw Error("cannot parse meta.position attribute ‘%s’", pos);
+ throw Error("cannot parse meta.position attribute '%s'", pos);
std::string filename(pos, 0, colon);
int lineno = std::stoi(std::string(pos, colon + 1));
@@ -67,7 +67,7 @@ struct CmdEdit : InstallablesCommand
execvp(editor.c_str(), stringsToCharPtrs(args).data());
- throw SysError("cannot run editor ‘%s’", editor);
+ throw SysError("cannot run editor '%s'", editor);
}
}
};
diff --git a/src/nix/hash.cc b/src/nix/hash.cc
index 98de88971..923dabb10 100644
--- a/src/nix/hash.cc
+++ b/src/nix/hash.cc
@@ -109,7 +109,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;
diff --git a/src/nix/installables.cc b/src/nix/installables.cc
index 59162fdc1..54c9f7841 100644
--- a/src/nix/installables.cc
+++ b/src/nix/installables.cc
@@ -221,7 +221,7 @@ std::vector<std::shared_ptr<Installable>> InstallablesCommand::parseInstallables
result.push_back(std::make_shared<InstallableAttrPath>(*this, s));
else
- throw UsageError("don't know what to do with argument ‘%s’", s);
+ throw UsageError("don't know what to do with argument '%s'", s);
}
return result;
diff --git a/src/nix/log.cc b/src/nix/log.cc
index 62ae6b8fa..0fb45c145 100644
--- a/src/nix/log.cc
+++ b/src/nix/log.cc
@@ -39,7 +39,7 @@ struct CmdLog : InstallablesCommand
break;
}
if (!found)
- throw Error("build log of path ‘%s’ is not available", path);
+ throw Error("build log of path '%s' is not available", path);
}
}
}
diff --git a/src/nix/ls.cc b/src/nix/ls.cc
index 417b7b421..a08e4c42c 100644
--- a/src/nix/ls.cc
+++ b/src/nix/ls.cc
@@ -67,7 +67,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);
diff --git a/src/nix/main.cc b/src/nix/main.cc
index 4b51c5ee1..7fece5b87 100644
--- a/src/nix/main.cc
+++ b/src/nix/main.cc
@@ -39,9 +39,9 @@ struct NixArgs : virtual MultiCommand, virtual MixCommonArgs
Args::printFlags(out);
std::cout <<
"\n"
- "In addition, most configuration settings can be overriden using ‘--<name> <value>’.\n"
- "Boolean settings can be overriden using ‘--<name>’ or ‘--no-<name>’. See ‘nix\n"
- "--help-config’ for a list of configuration settings.\n";
+ "In addition, most configuration settings can be overriden using '--<name> <value>'.\n"
+ "Boolean settings can be overriden using '--<name>' or '--no-<name>'. See 'nix\n"
+ "--help-config' for a list of configuration settings.\n";
}
void showHelpAndExit()
diff --git a/src/nix/repl.cc b/src/nix/repl.cc
index 7d5b8f466..e5a597add 100644
--- a/src/nix/repl.cc
+++ b/src/nix/repl.cc
@@ -397,7 +397,7 @@ bool NixRepl::processLine(string line)
return false;
else if (command != "")
- throw Error(format("unknown command ‘%1%’") % command);
+ throw Error(format("unknown command '%1%'") % command);
else {
size_t p = line.find('=');
@@ -460,7 +460,7 @@ void NixRepl::reloadFiles()
for (auto & i : old) {
if (!first) std::cout << std::endl;
first = false;
- std::cout << format("Loading ‘%1%’...") % i << std::endl;
+ std::cout << format("Loading '%1%'...") % i << std::endl;
loadFile(i);
}
}
diff --git a/src/nix/run.cc b/src/nix/run.cc
index 49fe4e7a0..f67fd637c 100644
--- a/src/nix/run.cc
+++ b/src/nix/run.cc
@@ -57,15 +57,15 @@ struct CmdRun : InstallablesCommand
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);
@@ -73,19 +73,19 @@ struct CmdRun : InstallablesCommand
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
}
@@ -97,7 +97,7 @@ struct CmdRun : InstallablesCommand
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'");
}
};
diff --git a/src/nix/search.cc b/src/nix/search.cc
index d3e018876..5bb376f8f 100644
--- a/src/nix/search.cc
+++ b/src/nix/search.cc
@@ -76,7 +76,7 @@ struct CmdSearch : SourceExprCommand, MixJSON
std::function<void(Value *, std::string, bool, JSONObject *)> doExpr;
doExpr = [&](Value * v, std::string attrPath, bool toplevel, JSONObject * cache) {
- debug("at attribute ‘%s’", attrPath);
+ debug("at attribute '%s'", attrPath);
try {
@@ -152,7 +152,7 @@ struct CmdSearch : SourceExprCommand, MixJSON
auto attrs = v->attrs;
Bindings::iterator j = attrs->find(sRecurse);
if (j == attrs->end() || !state->forceBool(*j->value, *j->pos)) {
- debug("skip attribute ‘%s’", attrPath);
+ debug("skip attribute '%s'", attrPath);
return;
}
}
@@ -175,7 +175,7 @@ struct CmdSearch : SourceExprCommand, MixJSON
} catch (AssertionError & e) {
} catch (Error & e) {
if (!toplevel) {
- e.addPrefix(fmt("While evaluating the attribute ‘%s’:\n", attrPath));
+ e.addPrefix(fmt("While evaluating the attribute '%s':\n", attrPath));
throw;
}
}
@@ -203,7 +203,7 @@ struct CmdSearch : SourceExprCommand, MixJSON
doExpr(getSourceExpr(*state), "", true, cache.get());
if (rename(tmpFile.c_str(), jsonCacheFileName.c_str()) == -1)
- throw SysError("cannot rename ‘%s’ to ‘%s’", tmpFile, jsonCacheFileName);
+ throw SysError("cannot rename '%s' to '%s'", tmpFile, jsonCacheFileName);
}
}
};
diff --git a/src/nix/sigs.cc b/src/nix/sigs.cc
index 0e3eb9b69..992ff7428 100644
--- a/src/nix/sigs.cc
+++ b/src/nix/sigs.cc
@@ -35,7 +35,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;
@@ -50,7 +50,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();
@@ -117,7 +117,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));
diff --git a/src/nix/verify.cc b/src/nix/verify.cc
index 973f60a74..0d9739314 100644
--- a/src/nix/verify.cc
+++ b/src/nix/verify.cc
@@ -78,7 +78,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);
@@ -93,7 +93,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 % info->narHash.to_string() % hash.first.to_string());
}
@@ -144,7 +144,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);
}
}