diff options
author | Matthias Clasen <mclasen@redhat.com> | 2008-04-06 01:23:53 -0400 |
---|---|---|
committer | Richard Hughes <richard@hughsie.com> | 2008-04-11 18:29:37 +0100 |
commit | 9b5274b5aaf63cbdb0ed7555a34cb774b84d88f2 (patch) | |
tree | 4cbc5128121ac2ba737d461baf7885c0445076f3 | |
parent | d8ce8fae0aa3bdc29cd3903c7b0b146958e8baae (diff) |
Friendlier message for "permission denied"
-rw-r--r-- | client/pk-console.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/client/pk-console.c b/client/pk-console.c index a4f728fd7..5a3d8834f 100644 --- a/client/pk-console.c +++ b/client/pk-console.c @@ -1231,9 +1231,14 @@ main (int argc, char *argv[]) g_print (_("Command failed\n")); } if (error != NULL) { - g_print ("Error:\n %s\n\n", error->message); - g_error_free (error); - g_print ("%s", options_help); + if (g_str_has_prefix (error->message, "org.freedesktop.packagekit.")) { + g_print (_("You don't have the necessary privileges for this operation\n")); + } + else { + g_print ("Error:\n %s\n\n", error->message); + g_error_free (error); + g_print ("%s", options_help); + } } g_free (options_help); |