[gnome-shell] extension-tool: Don't treat missing .js handler as error
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] extension-tool: Don't treat missing .js handler as error
- Date: Fri, 20 Dec 2019 14:16:32 +0000 (UTC)
commit d1f87ca115c9f7a51a24ce37eef0062ba6069b64
Author: Chuck <chuck intelligence org>
Date: Thu Dec 19 11:00:51 2019 -0800
extension-tool: Don't treat missing .js handler as error
After creating a new extension, we try to open the main source
file with the default handler, which fails when there is none.
But given that the extension was created successfully, don't treat
a missing handler as failure, and print the path to the new extension
instead.
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/905
subprojects/extensions-tool/src/command-create.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/subprojects/extensions-tool/src/command-create.c
b/subprojects/extensions-tool/src/command-create.c
index 13549643d8..2c140bba0b 100644
--- a/subprojects/extensions-tool/src/command-create.c
+++ b/subprojects/extensions-tool/src/command-create.c
@@ -118,9 +118,14 @@ launch_extension_source (GFile *dir, GError **error)
GList l;
main_source = g_file_get_child (dir, "extension.js");
- handler = g_file_query_default_handler (main_source, NULL, error);
+ handler = g_file_query_default_handler (main_source, NULL, NULL);
if (handler == NULL)
- return FALSE;
+ {
+ /* Translators: a file path to an extension directory */
+ g_print (_("The new extension was successfully created in %s.\n"),
+ g_file_peek_path (dir));
+ return TRUE;
+ }
l.data = main_source;
l.next = l.prev = NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]