From faf8ba1b7d9180a2115a48e99f7afee8f87c583e Mon Sep 17 00:00:00 2001 From: LangLangbart <92653266+LangLangBart@users.noreply.github.com> Date: Sun, 12 May 2024 23:16:02 +0200 Subject: [PATCH] chore: update debug log path and remove redirection --- gh-notify | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/gh-notify b/gh-notify index 8ed8d55..5626ad6 100755 --- a/gh-notify +++ b/gh-notify @@ -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 @@ -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