Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

backtrace runs twice when a function fails #1

Open
Elsie19 opened this issue Feb 22, 2022 · 0 comments
Open

backtrace runs twice when a function fails #1

Elsie19 opened this issue Feb 22, 2022 · 0 comments

Comments

@Elsie19
Copy link

Elsie19 commented Feb 22, 2022

File

#!/bin/bash
source ../base/backtrace.sh

function doomed_to_fail() {
    touch /root/test
}

doomed_to_fail

Output

touch: cannot touch '/root/test': Permission denied
Traceback (most recent call last):
  File "./test.sh", line 9, in main
    doomed_to_fail
  File "./test.sh", line 6, in doomed_to_fail
    touch /root/test
Exiting with status 1
Traceback (most recent call last):
  File "./test.sh", line 9, in main
    doomed_to_fail
Exiting with status 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant