Skip to content

Commit 9304303

Browse files
committed
modular: Improve ERR trap progress report message timing
Signed-off-by: 林博仁(Buo-ren, Lin) <Buo.Ren.Lin@gmail.com>
1 parent 8dda9f3 commit 9304303

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

modular.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,14 +79,13 @@ fi
7979
script_args=("${@}")
8080
}
8181

82+
printf \
83+
'Info: Setting the ERR trap...\n'
8284
trap_err(){
8385
printf \
8486
'Error: The program has encountered an unhandled error and is prematurely aborted.\n' \
8587
1>&2
8688
}
87-
88-
printf \
89-
'Info: Setting the ERR trap...\n'
9089
if ! trap trap_err ERR; then
9190
printf \
9291
'Error: Unable to set the ERR trap.\n' \

0 commit comments

Comments
 (0)