]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
curl: only warn once for --manual in manual-disabled build
authorDaniel Stenberg <daniel@haxx.se>
Sat, 24 May 2025 13:32:33 +0000 (15:32 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Sat, 24 May 2025 20:48:24 +0000 (22:48 +0200)
It would previously say it twice.

Closes #17441

src/tool_getparam.c
src/tool_operate.c

index 3b9ff5d4a2c7949af9b86272bd2d1068d04f87ac..fd246bfd7a2ad30e7cd556d6a4e10d74f37b75c7 100644 (file)
@@ -2806,10 +2806,6 @@ ParameterError getparameter(const char *flag, /* f or -long-flag */
       break;
     case C_MANUAL: /* --manual */
       if(toggle) { /* --no-manual shows no manual... */
-#ifndef USE_MANUAL
-        warnf(global,
-              "built-in manual was disabled at build-time");
-#endif
         err = PARAM_MANUAL_REQUESTED;
       }
       break;
index af9632c7814049694b24865bf58a2fa6bf31f867..24e79e6f61fa6465651e39ffceb4f1e9aaee1186 100644 (file)
@@ -2254,7 +2254,8 @@ CURLcode operate(struct GlobalConfig *global, int argc, argv_item_t argv[])
 #ifdef USE_MANUAL
         hugehelp();
 #else
-        puts("built-in manual was disabled at build-time");
+        warnf(global,
+              "built-in manual was disabled at build-time");
 #endif
       }
       /* Check if we were asked for the version information */