]> sjero.net Git - wget/blobdiff - src/init.c
Exit immediately if the system config file cannot be parsed.
[wget] / src / init.c
index ffdaa6d6a93c65fc1f7af6beb05b81287ab940fd..5559369d48ada3a571f54d3f1029c39b81f85538 100644 (file)
@@ -588,6 +588,15 @@ initialize (void)
   else if (file_exists_p (SYSTEM_WGETRC))
     ok &= run_wgetrc (SYSTEM_WGETRC);
 #endif
+  /* If there are any problems parsing the system wgetrc file, tell
+     the user and exit */
+  if (! ok)
+    {
+      fprintf (stderr, _("\
+Parsing system wgetrc file failed, please check '%s'.           \
+Or specify a different file using --config\n"), SYSTEM_WGETRC);
+      exit (2);
+    }
   /* Override it with your own, if one exists.  */
   file = wgetrc_file_name ();
   if (!file)