aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2019-12-10 10:23:53 -0500
committerJoseph Hunkeler <jhunkeler@gmail.com>2019-12-10 10:23:53 -0500
commitc9ed1675a99a2a10eebbc2acd046aeb0e3e9fa77 (patch)
tree990e5fe13aaae1b3fb3fa9712a8c733b4d2f4d97
parent217bd310b9da9ea39e0ff41473b27b0b2fc1d5e8 (diff)
downloadspmc-c9ed1675a99a2a10eebbc2acd046aeb0e3e9fa77.tar.gz
Broken
-rw-r--r--spm.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/spm.c b/spm.c
index 1cfc737..9282d29 100644
--- a/spm.c
+++ b/spm.c
@@ -1196,7 +1196,16 @@ int init_config_global() {
SPM_GLOBAL.user_config_file = get_user_config_file();
SPM_GLOBAL.package_dir = realpath(PKG_DIR, NULL);
if (SPM_GLOBAL.user_config_file) {
- config_read(SPM_GLOBAL.user_config_file);
+ SPM_GLOBAL.config = config_read(SPM_GLOBAL.user_config_file);
+ }
+}
+
+void show_global_config() {
+ printf("configuration directory: %s\n", SPM_GLOBAL.user_config_basedir);
+ printf("configuration file: %s\n", SPM_GLOBAL.user_config_file);
+ printf("configuration:\n");
+ for (int i = 0; SPM_GLOBAL.config[i] != NULL; i++) {
+ printf("-> %s\n", SPM_GLOBAL.config[i]);
}
}
@@ -1205,6 +1214,10 @@ int main(int argc, char *argv[]) {
// at the moment this will all be random tests, for better or worse
// everything here is subject to change without notice
+ // Initialize configuration data
+ init_config_global();
+ show_global_config();
+
// Ensure external programs are available for use.
check_runtime_environment();