Merge pull request #1324 from Pmodules/1316-misleading-message---pmodules-version-202

modulecmd: better error message if configuration file is not readable
This commit is contained in:
2025-11-27 11:00:01 +01:00
committed by GitHub
2 changed files with 5 additions and 1 deletions
+3
View File
@@ -3,6 +3,9 @@
## Version 2.0.3
### modulecmd
* Misleading error message fix if system configuration file is not
readable.
(#1316)
### build system
* set CC and CXX if not defined. This was a bug introduced in 2.0.2
+2 -1
View File
@@ -451,10 +451,11 @@ pm::read_config(){
if [[ -v PMODULES_CONFIG_FILE && -n "${PMODULES_CONFIG_FILE}" ]]; then
sys_config_file="${PMODULES_HOME%%/Tools*}/config/${PMODULES_CONFIG_FILE}"
fi
sys_config_file=$(readlink "${sys_config_file}")
test -r "${sys_config_file}" || \
std::die 3 \
"%s %s -- %s" \
"base overlay definition file" \
"Configuration file " \
"does not exist or is not readable" \
"$_"
DefaultGroups="${DefaultPmodulesConfig['default_groups']}"