mirror of
https://github.com/envmodules/modules.git
synced 2026-06-18 00:06:53 +08:00
To be able to 'puts' content on opened channels, the 'puts' command should be executed from the modulefile interpreter context. Elsewhere, master interpreter does not know about the channels opened in its sub-interpreters. Adapt interpreter setup to add a command renaming step, to avoid the puts modulefile alias to overwrite the original puts command. puts modulefile alias now also pass the caller interpreter reference as first argument to be able to execute the original puts command, renamed _puts, within context of this caller interpreter. Handle wrong argument number error in putsModfileCmd to report an error for 'puts' command rather '_puts' which should not be known by users. Add non-regression test to check puts command against opened channel. Fixes #157