summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog.asciidoc1
-rw-r--r--src/plugins/script/script-action.c12
-rw-r--r--src/plugins/script/script-repo.c5
3 files changed, 12 insertions, 6 deletions
diff --git a/ChangeLog.asciidoc b/ChangeLog.asciidoc
index 802b8a0cd..92a98c5cd 100644
--- a/ChangeLog.asciidoc
+++ b/ChangeLog.asciidoc
@@ -176,6 +176,7 @@ http://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes]
* rmodifier: remove plugin (replaced by trigger)
* ruby: fix crash when trying to load a directory with /ruby load
* ruby: add detection of Ruby 2.1
+* script: fix display of curl errors
* script: set option script.scripts.cache_expire to 1440 by default
* script: fix scroll on script buffer in the detailed view of script
(closes #6)
diff --git a/src/plugins/script/script-action.c b/src/plugins/script/script-action.c
index 9715bf872..3f2423a70 100644
--- a/src/plugins/script/script-action.c
+++ b/src/plugins/script/script-action.c
@@ -506,20 +506,23 @@ script_action_install_process_cb (void *data, const char *command,
int quiet, length;
struct t_script_repo *ptr_script;
+ /* make C compiler happy */
+ (void) out;
+
quiet = (data) ? 1 : 0;
if (return_code >= 0)
{
pos = strrchr (command, '/');
- if ((err && err[0]) || (out && (strncmp (out, "error:", 6) == 0)))
+ if (err && err[0])
{
weechat_printf (NULL,
_("%s%s: error downloading script \"%s\": %s"),
weechat_prefix ("error"),
SCRIPT_PLUGIN_NAME,
(pos) ? pos + 1 : "?",
- (err && err[0]) ? err : out + 6);
+ err);
return WEECHAT_RC_OK;
}
@@ -901,19 +904,20 @@ script_action_show_source_process_cb (void *data, const char *command,
/* make C compiler happy */
(void) data;
+ (void) out;
if (return_code >= 0)
{
pos = strrchr (command, '/');
- if ((err && err[0]) || (out && (strncmp (out, "error:", 6) == 0)))
+ if (err && err[0])
{
weechat_printf (NULL,
_("%s%s: error downloading script \"%s\": %s"),
weechat_prefix ("error"),
SCRIPT_PLUGIN_NAME,
(pos) ? pos + 1 : "?",
- (err && err[0]) ? err : out + 6);
+ err);
return WEECHAT_RC_OK;
}
diff --git a/src/plugins/script/script-repo.c b/src/plugins/script/script-repo.c
index bc7756a16..a3e6d7cd7 100644
--- a/src/plugins/script/script-repo.c
+++ b/src/plugins/script/script-repo.c
@@ -1405,18 +1405,19 @@ script_repo_file_update_process_cb (void *data, const char *command,
/* make C compiler happy */
(void) command;
+ (void) out;
quiet = (data == 0) ? 0 : 1;
if (return_code >= 0)
{
- if ((err && err[0]) || (out && (strncmp (out, "error:", 6) == 0)))
+ if (err && err[0])
{
weechat_printf (NULL,
_("%s%s: error downloading list of scripts: %s"),
weechat_prefix ("error"),
SCRIPT_PLUGIN_NAME,
- (err && err[0]) ? err : out + 6);
+ err);
return WEECHAT_RC_OK;
}