File tree Expand file tree Collapse file tree 3 files changed +6
-4
lines changed
examples/stacktrace/src/lib
lib/bashly/libraries/stacktrace Expand file tree Collapse file tree 3 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 14
14
# # default in bashly generated scripts.
15
15
# #
16
16
stacktrace () {
17
+ local exit_status=" $? "
17
18
local i=0
18
19
local caller_output line func file
19
20
@@ -24,5 +25,5 @@ stacktrace() {
24
25
printf " \tfrom %s:%s in \` %s\` \n" " $file " " $line " " $func "
25
26
i=$(( i + 1 ))
26
27
done
27
- exit 1
28
+ exit " $exit_status "
28
29
} >&2
Original file line number Diff line number Diff line change 14
14
# # default in bashly generated scripts.
15
15
# #
16
16
stacktrace () {
17
+ local exit_status=" $? "
17
18
local i=0
18
19
local caller_output line func file
19
20
@@ -24,5 +25,5 @@ stacktrace() {
24
25
printf " \tfrom %s:%s in \` %s\` \n" " $file " " $line " " $func "
25
26
i=$(( i + 1 ))
26
27
done
27
- exit 1
28
+ exit " $exit_status "
28
29
} >&2
Original file line number Diff line number Diff line change @@ -51,5 +51,5 @@ Examples:
51
51
52
52
Stack trace:
53
53
from ./download:15 in `root_command`
54
- from ./download:254 in `run`
55
- from ./download:260 in `main`
54
+ from ./download:255 in `run`
55
+ from ./download:261 in `main`
You can’t perform that action at this time.
0 commit comments