about summary refs log tree commit diff
path: root/src/buildenv/buildenv.cc
diff options
context:
space:
mode:
authorJörg Thalheim <joerg@thalheim.io>2017-07-30T11·27+0100
committerJörg Thalheim <joerg@thalheim.io>2017-07-30T11·32+0100
commit2fd8f8bb99a2832b3684878c020ba47322e79332 (patch)
tree65a667fbc746f4ff8efcaca3c0a58565985f26a5 /src/buildenv/buildenv.cc
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/buildenv/buildenv.cc')
-rw-r--r--src/buildenv/buildenv.cc20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/buildenv/buildenv.cc b/src/buildenv/buildenv.cc
index f997096eddbb..885c5e169039 100644
--- a/src/buildenv/buildenv.cc
+++ b/src/buildenv/buildenv.cc
@@ -12,7 +12,7 @@ static bool isDirectory (const Path & path)
 {
     struct stat st;
     if (stat(path.c_str(), &st) == -1)
-        throw SysError(format("getting status of ‘%1%’") % path);
+        throw SysError(format("getting status of '%1%'") % path);
     return S_ISDIR(st.st_mode);
 }
 
@@ -53,18 +53,18 @@ static void createLinks(const Path & srcDir, const Path & dstDir, int priority)
                 } else if (S_ISLNK(dstSt.st_mode)) {
                     auto target = readLink(dstFile);
                     if (!isDirectory(target))
-                        throw Error(format("collision between ‘%1%’ and non-directory ‘%2%’")
+                        throw Error(format("collision between '%1%' and non-directory '%2%'")
                             % srcFile % target);
                     if (unlink(dstFile.c_str()) == -1)
-                        throw SysError(format("unlinking ‘%1%’") % dstFile);
+                        throw SysError(format("unlinking '%1%'") % dstFile);
                     if (mkdir(dstFile.c_str(), 0755) == -1)
-                        throw SysError(format("creating directory ‘%1%’"));
+                        throw SysError(format("creating directory '%1%'"));
                     createLinks(target, dstFile, priorities[dstFile]);
                     createLinks(srcFile, dstFile, priority);
                     continue;
                 }
             } else if (errno != ENOENT)
-                throw SysError(format("getting status of ‘%1%’") % dstFile);
+                throw SysError(format("getting status of '%1%'") % dstFile);
         } else {
             struct stat dstSt;
             auto res = lstat(dstFile.c_str(), &dstSt);
@@ -74,17 +74,17 @@ static void createLinks(const Path & srcDir, const Path & dstDir, int priority)
                     auto prevPriority = priorities[dstFile];
                     if (prevPriority == priority)
                         throw Error(format(
-                                "collision between ‘%1%’ and ‘%2%’; "
-                                "use ‘nix-env --set-flag priority NUMBER PKGNAME’ "
+                                "collision between '%1%' and '%2%'; "
+                                "use 'nix-env --set-flag priority NUMBER PKGNAME' "
                                 "to change the priority of one of the conflicting packages"
                                 ) % srcFile % target);
                     if (prevPriority < priority)
                         continue;
                     if (unlink(dstFile.c_str()) == -1)
-                        throw SysError(format("unlinking ‘%1%’") % dstFile);
+                        throw SysError(format("unlinking '%1%'") % dstFile);
                 }
             } else if (errno != ENOENT)
-                throw SysError(format("getting status of ‘%1%’") % dstFile);
+                throw SysError(format("getting status of '%1%'") % dstFile);
         }
         createSymlink(srcFile, dstFile);
         priorities[dstFile] = priority;
@@ -112,7 +112,7 @@ static void addPkg(const Path & pkgDir, int priority)
         if (!fd) {
             if (errno == ENOENT)
                 return;
-            throw SysError(format("opening ‘%1%’") % propagatedFN);
+            throw SysError(format("opening '%1%'") % propagatedFN);
         }
         propagated = readLine(fd.get());
     }