Skip to content

Fix NUKE_CERT variables to be case insensitive in bash#536

Merged
marionbarker merged 3 commits intodevfrom
fix/nuke-certs-case-insensitive
Mar 16, 2026
Merged

Fix NUKE_CERT variables to be case insensitive in bash#536
marionbarker merged 3 commits intodevfrom
fix/nuke-certs-case-insensitive

Conversation

@bjorkert
Copy link
Contributor

Summary

  • Use ${VAR,,} bash parameter expansion for case-insensitive comparisons instead of introducing _LC helper variables (supersedes make the NUKE_CERT variables case insensitive #528)
  • Fix bug where FORCE_NUKE_CERTS was compared as the literal string vars.FORCE_NUKE_CERTS instead of the actual variable value
  • Add missing FORCE_NUKE_CERTS=${{ vars.FORCE_NUKE_CERTS }} assignment so bash has access to the variable
  • No changes to the nuke_certs job if: condition since GitHub Actions == is already case-insensitive

Test plan

  • Set ENABLE_NUKE_CERTS to True, TRUE, and true — all should be recognized
  • Set FORCE_NUKE_CERTS to True, TRUE, and true — all should trigger the force warning annotation
  • Set FORCE_NUKE_CERTS to false or unset — no force warning annotation
  • Verify the nuke_certs job still triggers correctly based on the GitHub Actions if: expression

Use ${VAR,,} parameter expansion for case-insensitive comparisons
in bash. Also fix bug where FORCE_NUKE_CERTS was compared as a
literal string instead of a variable value.

The GitHub Actions if: expressions (nuke_certs job) are already
case-insensitive, so no changes needed there.
@marionbarker
Copy link
Collaborator

Test

Push this branch to my docs-test organization.

Test FORCE_NUKE_CERTS failed

set FORCE_NUKE_CERTS to "TRUE"

line 16: ${ENABLE_NUKE_CERTS,,}: bad substitution

@marionbarker
Copy link
Collaborator

Comment on prior test:

The previous version used bash 4+ syntax and macos runners use bash 3.2.

Most recent commit uses syntax suitable for bash 3.2

Test

✅ successful tests

Ignore the Node.js.20 warnings. Those don't matter until Jun 2026 and they will be updated with a different PR when the tools are available.

Push this branch to my docs-test organization.

Test FORCE_NUKE_CERTS

set FORCE_NUKE_CERTS to "TRUE"
set ENABLE_NUKE_CERTS to "True"

Test ENABLE_NUKE_CERTS

valid certs test

set FORCE_NUKE_CERTS to "False"
leave ENABLE_NUKE_CERTS to "True"

invalid certs test

Delete my distribution certificate

Copy link
Collaborator

@marionbarker marionbarker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved by code review and test.

@marionbarker marionbarker merged commit be9289c into dev Mar 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants