3 ms·
It's actually possible to produce a stack trace of sorts, if you use a lot of bash functions. One possible implementation is: https://github.com/TritonDataCent
by jclulow 3y ago
It's actually possible to produce a stack trace of sorts, if you use a lot of bash functions. One possible implementation is: https://github.com/TritonDataCenter/sdc-headnode/blob/master/buildtools/lib/error_handler.sh https://github.com/TritonDataCenter/sdc-headnode/blob/master...
- drizzleword 3y agoAnother stack trace implementation [1] that allows you to write: some-command || fail "message" to produce a stack trace and exit the shell in case of non-zero exit status from some-command, or write some-command || softfail "message" || return $? in case you want to produce a stack trace and return from the function. [1]: https://github.com/runag/runag/blob/main/lib/fail.sh https://github.com/runag/runag/blob/main/lib/fail.sh