Skip to content

backtrace runs twice when a function fails #1

Description

@Elsie19

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions