Skip to content

Commit

Permalink
fix a bug that I caused
Browse files Browse the repository at this point in the history
  • Loading branch information
angelhof committed Apr 19, 2023
1 parent 13a4e3e commit 7a20b52
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions compiler/pash_runtime.sh
Original file line number Diff line number Diff line change
Expand Up @@ -187,16 +187,21 @@ else
# This is safe because the script is run sequentially and the shell
# won't be able to move forward until this is finished

## Inform the daemon (this happens before because otherwise when set -e is set we don't send the inform exit)
## However, this doesn't allow the compiler to get the proper execution time for a command
## TODO: Properly set and restore traps and then move inform afterwards
## First make a test that has set traps and set -e to exit (check set-e.sh)
inform_daemon_exit
# echo $traps_set


## Run the script
source "$RUNTIME_DIR/pash_wrap_vars.sh" "$pash_script_to_execute"
## This is the only difference between the sequential and the parallel
source "$RUNTIME_DIR/save_shell_state.sh"
pash_runtime_final_status="$PREVIOUS_SHELL_EC"
export pash_previous_set_status="$PREVIOUS_SET_STATUS"

## Inform the daemon
inform_daemon_exit

pash_redir_output echo "$$: (5) BaSh script exited with ec: $pash_runtime_final_status"
pash_redir_output echo "$$: (5) Current BaSh shell: $pash_previous_set_status"
pash_redir_output echo "$$: (5) Reverted to PaSh set state to: $-"
Expand Down

0 comments on commit 7a20b52

Please sign in to comment.