Skip to content

Commit

Permalink
FIX: Regression: Compatibility: Bash on MacOS 12 does not support ${v…
Browse files Browse the repository at this point in the history
…ar^^} (after ca444e4)

This went undetected because the CI/CD pipeline was broken again due to an outdated MacOS image.
Continue to use tr for uppercasing. Enable pipefail so that grep (which needs to happen before the uppercasing) result is still considered.

(This corrects commit ca444e4)
  • Loading branch information
inkarkat committed Sep 21, 2024
1 parent 447096c commit 4815442
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions todo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1346,8 +1346,8 @@ case $action in
"listpri" | "lsp" )
shift ## was "listpri", new $1 is priority to list or first TERM

pri=$(printf "%s\n" "$1" | grep '^\([A-Za-z]\|[A-Za-z]-[A-Za-z]\|[A-Z][A-Z-]*[A-Z]\)$') && shift || pri="A-Z"
post_filter_command="${post_filter_command:-}${post_filter_command:+ | }grep '^ *[0-9]\+ ([${pri^^}]) '"
pri=$(set -o pipefail; printf "%s\n" "$1" | grep '^\([A-Za-z]\|[A-Za-z]-[A-Za-z]\|[A-Z][A-Z-]*[A-Z]\)$' | tr '[:lower:]' '[:upper:]') && shift || pri="A-Z"
post_filter_command="${post_filter_command:-}${post_filter_command:+ | }grep '^ *[0-9]\+ ([${pri}]) '"
_list "$TODO_FILE" "$@"
;;

Expand Down

0 comments on commit 4815442

Please sign in to comment.