Open lotruheawea opened 9 months ago
Hi @lotruheawea, sorry for the late answer. As the exit hook is not part of the core script, so you should be able to use ecflow variables directly there: exit_hook='echo %HOOK_VAR%'
. Exporting the ecflow variable wouldn't help as they are exported after the definition of the exit hook.
What happened?
When a user defines a custom exit_hook for a given Task, contained ecFlow variables are not exported to environment variables: I guess the library needs to be adjusted in
nodes.py
line 1321 fromall_scripts = "\n".join(script + workdir_lines + module_lines)
toall_scripts = "\n".join(script + workdir_lines + module_lines + self._exit_hook)
What are the steps to reproduce the bug?
Version
v3.1.0
Platform (OS and architecture)
Linux ac6-101.bullx 4.18.0-372.52.1.el8_6.x86_64 #1 SMP Fri Mar 31 06:22:44 EDT 2023 x86_64 x86_64 x86_64 GNU/Linux
Relevant log output
No response
Accompanying data
No response
Organisation
No response