Skip to content

Commit

Permalink
Replace empty string ("") with <empty> on output of cosmic:reportChan…
Browse files Browse the repository at this point in the history
…gesFromDefault()
  • Loading branch information
Robert McLay committed Jul 4, 2022
1 parent 46d107e commit 6b2bd2a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion rt/configDir/err.txt
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ LMOD_CONFIG_DIR /etc/lmod ProjectDIR/rt/configDir/lmod_cfg_dir
LMOD_PACKAGE_PATH nil ProjectDIR/rt/configDir/lmod_cfg_dir
LMOD_SITE_MSG_FILE false ProjectDIR/rt/configDir/lmod_cfg_dir/lang.lua
LMOD_SITE_NAME false XYZZY
LMOD_SYSTEM_DEFAULT_MODULES __unknown__
LMOD_SYSTEM_DEFAULT_MODULES __unknown__ <empty>
Active RC file(s):
ProjectDIR/src/../init/lmodrc.lua
Lmod Property Table:
Expand Down
8 changes: 4 additions & 4 deletions rt/help/err.txt
Original file line number Diff line number Diff line change
Expand Up @@ -285,8 +285,8 @@ Tmod find first rule no
Tmod prepend PATH Rule no
Tracing no
uname -a
LMOD_PACKAGE_PATH nil
LMOD_SYSTEM_DEFAULT_MODULES __unknown__
LMOD_PACKAGE_PATH nil <empty>
LMOD_SYSTEM_DEFAULT_MODULES __unknown__ <empty>
Active RC file(s):
ProjectDIR/src/../init/lmodrc.lua
OutputDIR/.lmodrc.lua
Expand Down Expand Up @@ -403,8 +403,8 @@ lua ProjectDIR/src/lmod.in.lua bash --regression_testing --miniConfig
===========================
Modules based on Lua: Version 8.7.6 2022-06-25 15:58 -05:00
by Robert McLay [email protected]
LMOD_PACKAGE_PATH nil
LMOD_SYSTEM_DEFAULT_MODULES __unknown__
LMOD_PACKAGE_PATH nil <empty>
LMOD_SYSTEM_DEFAULT_MODULES __unknown__ <empty>
===========================
step 7
lua ProjectDIR/src/chkJson
Expand Down
4 changes: 3 additions & 1 deletion tools/Cosmic.lua
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,9 @@ function M.reportChangesFromDefault(self)

for k,v in pairsByKeys(T) do
if (v.value ~= v.default) then
a[#a+1] = {k, tostring(v.default), tostring(v.value)}
local value = v.value
if (value == "" ) then value = "<empty>" end
a[#a+1] = {k, tostring(v.default), tostring(value)}
end
end

Expand Down

0 comments on commit 6b2bd2a

Please sign in to comment.