aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/tool_getparam.c7
-rw-r--r--src/tool_getparam.h1
-rw-r--r--src/tool_operate.c3
-rw-r--r--src/tool_parsecfg.c1
4 files changed, 8 insertions, 4 deletions
diff --git a/src/tool_getparam.c b/src/tool_getparam.c
index 05dd64853..a38cbc235 100644
--- a/src/tool_getparam.c
+++ b/src/tool_getparam.c
@@ -1701,10 +1701,8 @@ ParameterError getparameter(char *flag, /* f or -long-flag */
config->tracetype = TRACE_NONE;
break;
case 'V':
- if(toggle) { /* --no-version yields no output! */
- tool_version_info();
- return PARAM_HELP_REQUESTED;
- }
+ if(toggle) /* --no-version yields no output! */
+ return PARAM_VERSION_INFO_REQUESTED;
break;
case 'w':
@@ -1866,6 +1864,7 @@ ParameterError parse_args(struct Configurable *config, int argc,
}
if(result && result != PARAM_HELP_REQUESTED &&
+ result != PARAM_VERSION_INFO_REQUESTED &&
result != PARAM_ENGINES_REQUESTED) {
const char *reason = param2text(result);
diff --git a/src/tool_getparam.h b/src/tool_getparam.h
index 1fac8daef..ac55d0b18 100644
--- a/src/tool_getparam.h
+++ b/src/tool_getparam.h
@@ -30,6 +30,7 @@ typedef enum {
PARAM_REQUIRES_PARAMETER,
PARAM_BAD_USE,
PARAM_HELP_REQUESTED,
+ PARAM_VERSION_INFO_REQUESTED,
PARAM_ENGINES_REQUESTED,
PARAM_GOT_EXTRA_PARAMETER,
PARAM_BAD_NUMERIC,
diff --git a/src/tool_operate.c b/src/tool_operate.c
index f6ebf5f3e..bf10b8111 100644
--- a/src/tool_operate.c
+++ b/src/tool_operate.c
@@ -1828,6 +1828,9 @@ CURLcode operate(struct Configurable *config, int argc, argv_item_t argv[])
if(res) {
result = CURLE_OK;
+ /* Check if we were asked for the version information */
+ if(res == PARAM_VERSION_INFO_REQUESTED)
+ tool_version_info();
/* Check if we were asked to list the SSL engines */
if(res == PARAM_ENGINES_REQUESTED)
tool_list_engines(config->easy);
diff --git a/src/tool_parsecfg.c b/src/tool_parsecfg.c
index 44d7001f0..9115a05dd 100644
--- a/src/tool_parsecfg.c
+++ b/src/tool_parsecfg.c
@@ -231,6 +231,7 @@ int parseconfig(const char *filename,
filename = (char *)"<stdin>";
}
if(res != PARAM_HELP_REQUESTED &&
+ res != PARAM_VERSION_INFO_REQUESTED &&
res != PARAM_ENGINES_REQUESTED) {
const char *reason = param2text(res);
warnf(config, "%s:%d: warning: '%s' %s\n",