fix: finalize exited shell tasks and preserve command environments

This commit is contained in:
whyour
2026-09-29 00:52:33 +08:00
parent bc0f35e3f7
commit def4917447
4 changed files with 137 additions and 3 deletions
+3 -1
View File
@@ -84,7 +84,9 @@ env_str_to_array() {
}
clear_non_sh_env() {
if [[ $file_param != *.sh ]]; then
# Only automatic Node/Python preloads reconstruct the generated environment.
# Explicit interpreters and other commands must keep the shell-loaded values.
if [[ $isJsOrPythonFile == 'true' ]]; then
clear_env
fi
}