about summary refs log tree commit diff
path: root/src/nix-channel/nix-channel.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2016-11-25T23·37+0100
committerEelco Dolstra <edolstra@gmail.com>2016-11-25T23·38+0100
commit215b70f51e5abd350c9b7db656aedac9d96d0046 (patch)
tree95778448ecdfbc1d8f4c254813cc5d91ed62a832 /src/nix-channel/nix-channel.cc
parentf78126bfd6b6c8477fcdbc09b2f98772dbe9a1e7 (diff)
Revert "Get rid of unicode quotes (#1140)"
This reverts commit f78126bfd6b6c8477fcdbc09b2f98772dbe9a1e7. There
really is no need for such a massive change...
Diffstat (limited to 'src/nix-channel/nix-channel.cc')
-rwxr-xr-xsrc/nix-channel/nix-channel.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/nix-channel/nix-channel.cc b/src/nix-channel/nix-channel.cc
index 752e0b830aa7..361627823126 100755
--- a/src/nix-channel/nix-channel.cc
+++ b/src/nix-channel/nix-channel.cc
@@ -35,7 +35,7 @@ static void writeChannels()
 {
     auto channelsFD = AutoCloseFD{open(channelsList.c_str(), O_WRONLY | O_CLOEXEC | O_CREAT | O_TRUNC, 0644)};
     if (!channelsFD)
-        throw SysError(format("opening '%1%' for writing") % channelsList);
+        throw SysError(format("opening ‘%1%’ for writing") % channelsList);
     for (const auto & channel : channels)
         writeFull(channelsFD.get(), channel.second + " " + channel.first + "\n");
 }
@@ -44,9 +44,9 @@ static void writeChannels()
 static void addChannel(const string & url, const string & name)
 {
     if (!regex_search(url, std::regex("^(file|http|https)://")))
-        throw Error(format("invalid channel URL '%1%'") % url);
+        throw Error(format("invalid channel URL ‘%1%’") % url);
     if (!regex_search(name, std::regex("^[a-zA-Z0-9_][a-zA-Z0-9_\\.-]*$")))
-        throw Error(format("invalid channel identifier '%1%'") % name);
+        throw Error(format("invalid channel identifier ‘%1%’") % name);
     readChannels();
     channels[name] = url;
     writeChannels();
@@ -224,7 +224,7 @@ int main(int argc, char ** argv)
                 throw UsageError("no command specified");
             case cAdd:
                 if (args.size() < 1 || args.size() > 2)
-                    throw UsageError("'--add' requires one or two arguments");
+                    throw UsageError("‘--add’ requires one or two arguments");
                 {
                 auto url = args[0];
                 auto name = string{};
@@ -240,12 +240,12 @@ int main(int argc, char ** argv)
                 break;
             case cRemove:
                 if (args.size() != 1)
-                    throw UsageError("'--remove' requires one argument");
+                    throw UsageError("‘--remove’ requires one argument");
                 removeChannel(args[0]);
                 break;
             case cList:
                 if (!args.empty())
-                    throw UsageError("'--list' expects no arguments");
+                    throw UsageError("‘--list’ expects no arguments");
                 readChannels();
                 for (const auto & channel : channels)
                     std::cout << channel.first << ' ' << channel.second << '\n';
@@ -255,7 +255,7 @@ int main(int argc, char ** argv)
                 break;
             case cRollback:
                 if (args.size() > 1)
-                    throw UsageError("'--rollback' has at most one argument");
+                    throw UsageError("‘--rollback’ has at most one argument");
                 auto envArgs = Strings{"--profile", profile};
                 if (args.size() == 1) {
                     envArgs.push_back("--switch-generation");