Skip to content

Commit

Permalink
Enable debugging also if ACTIONS_STEP_DEBUG==true (#151)
Browse files Browse the repository at this point in the history
Co-authored-by: William Woodruff <[email protected]>
  • Loading branch information
rindeal and woodruffw authored Oct 2, 2024
1 parent 2b042a8 commit ac25d5a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion action.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@
_SUMMARY = Path(_summary_path).open("a")

_RENDER_SUMMARY = os.getenv("GHA_SIGSTORE_PYTHON_SUMMARY", "true") == "true"
_DEBUG = os.getenv("GHA_SIGSTORE_PYTHON_INTERNAL_BE_CAREFUL_DEBUG", "false") != "false"
_DEBUG = os.getenv("GHA_SIGSTORE_PYTHON_INTERNAL_BE_CAREFUL_DEBUG", "false") != "false" or \
os.getenv("ACTIONS_STEP_DEBUG", "false") == "true"

_RELEASE_SIGNING_ARTIFACTS = (
os.getenv("GHA_SIGSTORE_PYTHON_RELEASE_SIGNING_ARTIFACTS", "true") == "true"
Expand Down
6 changes: 4 additions & 2 deletions setup/setup.bash
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@ die() {
}

debug() {
if [[ "${GHA_SIGSTORE_PYTHON_INTERNAL_BE_CAREFUL_DEBUG}" = "true" ]]; then
echo -e "\033[93mDEBUG: ${1}\033[0m"
if [[ "${GHA_SIGSTORE_PYTHON_INTERNAL_BE_CAREFUL_DEBUG:-false}" != "false" || \
"${ACTIONS_STEP_DEBUG:-false}" == 'true' ]]
then
echo -e "\033[93mDEBUG: ${1}\033[0m" >&2
fi
}

Expand Down

0 comments on commit ac25d5a

Please sign in to comment.