From e87d3b5e437390911fc59100d19049d3bcf2278b Mon Sep 17 00:00:00 2001 From: per1234 Date: Fri, 12 Sep 2025 12:10:41 -0700 Subject: [PATCH] Correct syntax of shell code in "Check Certificates" workflow Previously, the command was erroneously split at the first parenthesis. This resulted in the introduction of spaces between the two parentheses, which caused the syntax to be interpreted as a command substitution operator instead of the intended arithmetic expansion operator. This caused the command to fail: ``` /home/runner/work/_temp/2470dde2-826c-4a00-8268-b8d111566dc2.sh: line 46: syntax error near unexpected token `/' ``` --- .github/workflows/check-certificates.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/check-certificates.yml b/.github/workflows/check-certificates.yml index c1c9125f..2d8bb8bd 100644 --- a/.github/workflows/check-certificates.yml +++ b/.github/workflows/check-certificates.yml @@ -172,9 +172,9 @@ jobs: )" fi - DAYS_BEFORE_EXPIRATION="$( - (($(date --utc --date="$EXPIRATION_DATE" +%s) - $(date --utc +%s)) / 60 / 60 / 24) - )" + DAYS_BEFORE_EXPIRATION="$(( + ($(date --utc --date="$EXPIRATION_DATE" +%s) - $(date --utc +%s)) / 60 / 60 / 24 + ))" # Display the expiration information in the log. echo "Certificate expiration date: $EXPIRATION_DATE"