From 07eae9a5979fe5053da8f976e1f2f1d2d96500e3 Mon Sep 17 00:00:00 2001 From: oliviermattelaer <33414646+oliviermattelaer@users.noreply.github.com> Date: Wed, 15 Feb 2023 12:19:38 +0100 Subject: [PATCH] Update gsh.sh according to developer documentation the environment variable GSH_LAST_ACTION should be set before the gsh clean, while for the check command it is done after making the use of that environment variable not usable. --- lib/gsh.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/gsh.sh b/lib/gsh.sh index 5f8e1fc5c..38538dc21 100644 --- a/lib/gsh.sh +++ b/lib/gsh.sh @@ -427,10 +427,11 @@ You should use the command fi fi + export GSH_LAST_ACTION='check_true' __gsh_clean "$MISSION_NB" __log_action "$MISSION_NB" "CHECK_OK" - export GSH_LAST_ACTION='check_true' + if [ -n "$GSH_AUTOSAVE" ] && [ "$GSH_AUTOSAVE" != "0" ] then @@ -444,9 +445,10 @@ You should use the command color_echo red "$(eval_gettext "Sorry, mission \$MISSION_NB hasn't been completed.")" echo + export GSH_LAST_ACTION='check_false' __gsh_clean "$MISSION_NB" __log_action "$MISSION_NB" "CHECK_OOPS" - export GSH_LAST_ACTION='check_false' + if [ -n "$GSH_AUTOSAVE" ] && [ "$GSH_AUTOSAVE" != "0" ] then