gnuastro-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnuastro-commits] master 8644305 5/6: Correctly report conf files check


From: Mohammad Akhlaghi
Subject: [gnuastro-commits] master 8644305 5/6: Correctly report conf files checked
Date: Sun, 2 Oct 2016 22:23:46 +0000 (UTC)

branch: master
commit 86443058752e4be24a574630be08a8f39a2999bd
Author: Mohammad Akhlaghi <address@hidden>
Commit: Mohammad Akhlaghi <address@hidden>

    Correctly report conf files checked
    
    When `--onlydirconf' is given, the user and system configuration files are
    not used. However, in the error message that is reported (even with this
    option), we tell the users that we have checked the user and system
    configuration files. This can cause confusion. So a check was added so when
    this option is given, the user and system configuration files are not
    printed.
---
 lib/configfiles.h |   10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/lib/configfiles.h b/lib/configfiles.h
index 3ef1126..3cfc1d3 100644
--- a/lib/configfiles.h
+++ b/lib/configfiles.h
@@ -159,10 +159,12 @@ __BEGIN_C_DECLS  /* From C++ preparations */
                 "command-line option. See `%s --help` or `info %s` for "\
                 "more information.\n\n", SPACK, SPACK);                 \
         userconfig_file=                                                \
-        gal_configfiles_add_home_dir(USERCONFIG_FILEEND);               \
-        fprintf(stderr, "Default files checked (existing or not):\n"    \
-                "   %s\n   %s\n   %s\n", CURDIRCONFIG_FILE,             \
-                userconfig_file, SYSCONFIG_FILE);                       \
+          gal_configfiles_add_home_dir(USERCONFIG_FILEEND);             \
+        fprintf(stderr, "Default files checked (existing or not):\n");  \
+        fprintf(stderr, "   %s\n", CURDIRCONFIG_FILE);                  \
+        if(p->cp.onlydirconf==0)                                        \
+          fprintf(stderr, "   %s\n   %s\n", userconfig_file,            \
+                  SYSCONFIG_FILE);                                      \
         free(userconfig_file);                                          \
         exit(EXIT_FAILURE);                                             \
       }                                                                 \



reply via email to

[Prev in Thread] Current Thread [Next in Thread]