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 1414# # default in bashly generated scripts.
1515# #
1616stacktrace () {
17+ local exit_status=" $? "
1718 local i=0
1819 local caller_output line func file
1920
@@ -24,5 +25,5 @@ stacktrace() {
2425 printf " \tfrom %s:%s in \` %s\` \n" " $file " " $line " " $func "
2526 i=$(( i + 1 ))
2627 done
27- exit 1
28+ exit " $exit_status "
2829} >&2
Original file line number Diff line number Diff line change 1414# # default in bashly generated scripts.
1515# #
1616stacktrace () {
17+ local exit_status=" $? "
1718 local i=0
1819 local caller_output line func file
1920
@@ -24,5 +25,5 @@ stacktrace() {
2425 printf " \tfrom %s:%s in \` %s\` \n" " $file " " $line " " $func "
2526 i=$(( i + 1 ))
2627 done
27- exit 1
28+ exit " $exit_status "
2829} >&2
Original file line number Diff line number Diff line change @@ -51,5 +51,5 @@ Examples:
5151
5252Stack trace:
5353 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