diff options
author | Jörg Thalheim <joerg@thalheim.io> | 2017-07-30 12:27:57 +0100 |
---|---|---|
committer | Jörg Thalheim <joerg@thalheim.io> | 2017-07-30 12:32:45 +0100 |
commit | 2fd8f8bb99a2832b3684878c020ba47322e79332 (patch) | |
tree | 65a667fbc746f4ff8efcaca3c0a58565985f26a5 /src/nix/run.cc | |
parent | c7654bc491d9ce7c1fbadecd7769418fa79a2060 (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/run.cc')
-rw-r--r-- | src/nix/run.cc | 16 |
1 files changed, 8 insertions, 8 deletions
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'"); } }; |