provide feedback on failure cause if plugin installation fails
This commit is contained in:
committed by
Dmitry Podgorny
parent
adb4955c34
commit
1f66c08567
@@ -6616,12 +6616,13 @@ cmd_plugins_install(ProfWin *window, const char *const command, gchar **args)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
GString* error_message = g_string_new(NULL);
|
||||
gchar *plugin_name = g_path_get_basename(path);
|
||||
gboolean result = plugins_install(plugin_name, path);
|
||||
gboolean result = plugins_install(plugin_name, path, error_message);
|
||||
if (result) {
|
||||
cons_show("Plugin installed: %s", plugin_name);
|
||||
} else {
|
||||
cons_show("Failed to install plugin: %s", plugin_name);
|
||||
cons_show("Failed to install plugin: %s. %s", plugin_name, error_message->str);
|
||||
}
|
||||
g_free(plugin_name);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user