Skip to content

Commit

Permalink
chore: update debug log path and remove redirection
Browse files Browse the repository at this point in the history
  • Loading branch information
LangLangBart committed May 12, 2024
1 parent da05fa9 commit faf8ba1
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions gh-notify
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export GH_NOTIFY_PER_PAGE_LIMIT=50
# Assign 'GH_NOTIFY_DEBUG_MODE' with 'true' to see more information
export GH_NOTIFY_DEBUG_MODE=${GH_NOTIFY_DEBUG_MODE:-false}
if $GH_NOTIFY_DEBUG_MODE; then
export gh_notify_debug_log="${BASH_SOURCE%/*}/gh_notify_debug.log"
export gh_notify_debug_log="${BASH_SOURCE[0]%/*}/gh_notify_debug.log"

# Tell the user where we saved the debug information
trap 'echo [DEBUG] $gh_notify_debug_log' EXIT
Expand All @@ -37,9 +37,6 @@ if $GH_NOTIFY_DEBUG_MODE; then
# Unset GH_FORCE_TTY to avoid unnecessary color codes in the debug file
unset GH_FORCE_TTY

# Redirect stdout and stderr to the terminal and a file
exec &> >(tee -a "$gh_notify_debug_log")

# [DISABLED] 'GH_DEBUG' sends the output to file descriptor 2, but these error messages can be
# caught by adding '2>&5' to all gh api calls, but this would also hide the actual error message
# from a failed gh api call. It would be great to have an actual environment variable like
Expand Down

0 comments on commit faf8ba1

Please sign in to comment.