aboutsummaryrefslogtreecommitdiff
path: root/src/nix-store
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-store
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-store')
-rw-r--r--src/nix-store/dotgraph.cc2
-rw-r--r--src/nix-store/nix-store.cc48
2 files changed, 25 insertions, 25 deletions
diff --git a/src/nix-store/dotgraph.cc b/src/nix-store/dotgraph.cc
index 356a82510..51dedcf0a 100644
--- a/src/nix-store/dotgraph.cc
+++ b/src/nix-store/dotgraph.cc
@@ -77,7 +77,7 @@ void printClosure(const Path & nePath, const StoreExpr & fs)
ClosureElems::const_iterator elem = fs.closure.elems.find(path);
if (elem == fs.closure.elems.end())
- throw Error(format("bad closure, missing path ‘%1%’") % path);
+ throw Error(format("bad closure, missing path '%1%'") % path);
for (StringSet::const_iterator i = elem->second.refs.begin();
i != elem->second.refs.end(); ++i)
diff --git a/src/nix-store/nix-store.cc b/src/nix-store/nix-store.cc
index 6cea57a76..1668fdb2d 100644
--- a/src/nix-store/nix-store.cc
+++ b/src/nix-store/nix-store.cc
@@ -51,7 +51,7 @@ static Path useDeriver(Path path)
if (isDerivation(path)) return path;
Path drvPath = store->queryPathInfo(path)->deriver;
if (drvPath == "")
- throw Error(format("deriver of path ‘%1%’ is not known") % path);
+ throw Error(format("deriver of path '%1%' is not known") % path);
return drvPath;
}
@@ -76,7 +76,7 @@ static PathSet realisePath(Path path, bool build = true)
for (auto & j : p.second) {
DerivationOutputs::iterator i = drv.outputs.find(j);
if (i == drv.outputs.end())
- throw Error(format("derivation ‘%1%’ does not have an output named ‘%2%’") % p.first % j);
+ throw Error(format("derivation '%1%' does not have an output named '%2%'") % p.first % j);
Path outPath = i->second.path;
if (store2) {
if (gcRoot == "")
@@ -95,7 +95,7 @@ static PathSet realisePath(Path path, bool build = true)
else {
if (build) store->ensurePath(path);
- else if (!store->isValidPath(path)) throw Error(format("path ‘%1%’ does not exist and cannot be created") % path);
+ else if (!store->isValidPath(path)) throw Error(format("path '%1%' does not exist and cannot be created") % path);
if (store2) {
if (gcRoot == "")
printGCWarning();
@@ -124,7 +124,7 @@ static void opRealise(Strings opFlags, Strings opArgs)
else if (i == "--check") buildMode = bmCheck;
else if (i == "--hash") buildMode = bmHash;
else if (i == "--ignore-unknown") ignoreUnknown = true;
- else throw UsageError(format("unknown flag ‘%1%’") % i);
+ else throw UsageError(format("unknown flag '%1%'") % i);
Paths paths;
for (auto & i : opArgs) {
@@ -181,7 +181,7 @@ static void opAddFixed(Strings opFlags, Strings opArgs)
for (auto & i : opFlags)
if (i == "--recursive") recursive = true;
- else throw UsageError(format("unknown flag ‘%1%’") % i);
+ else throw UsageError(format("unknown flag '%1%'") % i);
if (opArgs.empty())
throw UsageError("first argument must be hash algorithm");
@@ -201,10 +201,10 @@ static void opPrintFixedPath(Strings opFlags, Strings opArgs)
for (auto i : opFlags)
if (i == "--recursive") recursive = true;
- else throw UsageError(format("unknown flag ‘%1%’") % i);
+ else throw UsageError(format("unknown flag '%1%'") % i);
if (opArgs.size() != 3)
- throw UsageError(format("‘--print-fixed-path’ requires three arguments"));
+ throw UsageError(format("'--print-fixed-path' requires three arguments"));
Strings::iterator i = opArgs.begin();
HashType hashAlgo = parseHashType(*i++);
@@ -306,9 +306,9 @@ static void opQuery(Strings opFlags, Strings opArgs)
else if (i == "--use-output" || i == "-u") useOutput = true;
else if (i == "--force-realise" || i == "--force-realize" || i == "-f") forceRealise = true;
else if (i == "--include-outputs") includeOutputs = true;
- else throw UsageError(format("unknown flag ‘%1%’") % i);
+ else throw UsageError(format("unknown flag '%1%'") % i);
if (prev != qDefault && prev != query)
- throw UsageError(format("query type ‘%1%’ conflicts with earlier flag") % i);
+ throw UsageError(format("query type '%1%' conflicts with earlier flag") % i);
}
if (query == qDefault) query = qOutputs;
@@ -366,7 +366,7 @@ static void opQuery(Strings opFlags, Strings opArgs)
Derivation drv = store->derivationFromPath(path);
StringPairs::iterator j = drv.env.find(bindingName);
if (j == drv.env.end())
- throw Error(format("derivation ‘%1%’ has no environment binding named ‘%2%’")
+ throw Error(format("derivation '%1%' has no environment binding named '%2%'")
% path % bindingName);
cout << format("%1%\n") % j->second;
}
@@ -452,7 +452,7 @@ static string shellEscape(const string & s)
static void opPrintEnv(Strings opFlags, Strings opArgs)
{
if (!opFlags.empty()) throw UsageError("unknown flag");
- if (opArgs.size() != 1) throw UsageError("‘--print-env’ requires one derivation store path");
+ if (opArgs.size() != 1) throw UsageError("'--print-env' requires one derivation store path");
Path drvPath = opArgs.front();
Derivation drv = store->derivationFromPath(drvPath);
@@ -485,7 +485,7 @@ static void opReadLog(Strings opFlags, Strings opArgs)
auto path = store->followLinksToStorePath(i);
auto log = store->getBuildLog(path);
if (!log)
- throw Error("build log of derivation ‘%s’ is not available", path);
+ throw Error("build log of derivation '%s' is not available", path);
std::cout << *log;
}
}
@@ -543,7 +543,7 @@ static void opRegisterValidity(Strings opFlags, Strings opArgs)
for (auto & i : opFlags)
if (i == "--reregister") reregister = true;
else if (i == "--hash-given") hashGiven = true;
- else throw UsageError(format("unknown flag ‘%1%’") % i);
+ else throw UsageError(format("unknown flag '%1%'") % i);
if (!opArgs.empty()) throw UsageError("no arguments expected");
@@ -557,7 +557,7 @@ static void opCheckValidity(Strings opFlags, Strings opArgs)
for (auto & i : opFlags)
if (i == "--print-invalid") printInvalid = true;
- else throw UsageError(format("unknown flag ‘%1%’") % i);
+ else throw UsageError(format("unknown flag '%1%'") % i);
for (auto & i : opArgs) {
Path path = store->followLinksToStorePath(i);
@@ -565,7 +565,7 @@ static void opCheckValidity(Strings opFlags, Strings opArgs)
if (printInvalid)
cout << format("%1%\n") % path;
else
- throw Error(format("path ‘%1%’ is not valid") % path);
+ throw Error(format("path '%1%' is not valid") % path);
}
}
}
@@ -589,7 +589,7 @@ static void opGC(Strings opFlags, Strings opArgs)
long long maxFreed = getIntArg<long long>(*i, i, opFlags.end(), true);
options.maxFreed = maxFreed >= 0 ? maxFreed : 0;
}
- else throw UsageError(format("bad sub-operation ‘%1%’ in GC") % *i);
+ else throw UsageError(format("bad sub-operation '%1%' in GC") % *i);
if (!opArgs.empty()) throw UsageError("no arguments expected");
@@ -620,7 +620,7 @@ static void opDelete(Strings opFlags, Strings opArgs)
for (auto & i : opFlags)
if (i == "--ignore-liveness") options.ignoreLiveness = true;
- else throw UsageError(format("unknown flag ‘%1%’") % i);
+ else throw UsageError(format("unknown flag '%1%'") % i);
for (auto & i : opArgs)
options.pathsToDelete.insert(store->followLinksToStorePath(i));
@@ -659,7 +659,7 @@ static void opRestore(Strings opFlags, Strings opArgs)
static void opExport(Strings opFlags, Strings opArgs)
{
for (auto & i : opFlags)
- throw UsageError(format("unknown flag ‘%1%’") % i);
+ throw UsageError(format("unknown flag '%1%'") % i);
for (auto & i : opArgs)
i = store->followLinksToStorePath(i);
@@ -672,7 +672,7 @@ static void opExport(Strings opFlags, Strings opArgs)
static void opImport(Strings opFlags, Strings opArgs)
{
for (auto & i : opFlags)
- throw UsageError(format("unknown flag ‘%1%’") % i);
+ throw UsageError(format("unknown flag '%1%'") % i);
if (!opArgs.empty()) throw UsageError("no arguments expected");
@@ -707,7 +707,7 @@ static void opVerify(Strings opFlags, Strings opArgs)
for (auto & i : opFlags)
if (i == "--check-contents") checkContents = true;
else if (i == "--repair") repair = Repair;
- else throw UsageError(format("unknown flag ‘%1%’") % i);
+ else throw UsageError(format("unknown flag '%1%'") % i);
if (store->verifyStore(checkContents, repair)) {
printError("warning: not all errors were fixed");
@@ -726,14 +726,14 @@ static void opVerifyPath(Strings opFlags, Strings opArgs)
for (auto & i : opArgs) {
Path path = store->followLinksToStorePath(i);
- printMsg(lvlTalkative, format("checking path ‘%1%’...") % path);
+ printMsg(lvlTalkative, format("checking path '%1%'...") % path);
auto info = store->queryPathInfo(path);
HashSink sink(info->narHash.type);
store->narFromPath(path, sink);
auto current = sink.finish();
if (current.first != info->narHash) {
printError(
- format("path ‘%1%’ was modified! expected hash ‘%2%’, got ‘%3%’")
+ format("path '%1%' was modified! expected hash '%2%', got '%3%'")
% path % info->narHash.to_string() % current.first.to_string());
status = 1;
}
@@ -772,7 +772,7 @@ static void opServe(Strings opFlags, Strings opArgs)
bool writeAllowed = false;
for (auto & i : opFlags)
if (i == "--write") writeAllowed = true;
- else throw UsageError(format("unknown flag ‘%1%’") % i);
+ else throw UsageError(format("unknown flag '%1%'") % i);
if (!opArgs.empty()) throw UsageError("no arguments expected");
@@ -942,7 +942,7 @@ static void opServe(Strings opFlags, Strings opArgs)
static void opGenerateBinaryCacheKey(Strings opFlags, Strings opArgs)
{
for (auto & i : opFlags)
- throw UsageError(format("unknown flag ‘%1%’") % i);
+ throw UsageError(format("unknown flag '%1%'") % i);
if (opArgs.size() != 3) throw UsageError("three arguments expected");
auto i = opArgs.begin();