Skip to content

fix(bootstrap): define the warn helper - #140

Open
royosherove wants to merge 1 commit into
mainfrom
crew/drew/issue-128
Open

royosherove wants to merge 1 commit into
mainfrom
crew/drew/issue-128

Conversation

@royosherove

Copy link
Copy Markdown
Member

Fixes #128.

Summary

deploy/bootstrap.sh calls warn at three top-level lines, but the script defines only step, ok, fail and info. The script runs with set -euo pipefail, so the first warning gives "command not found" and stops the bootstrap.

  • Add warn() next to the other log helpers. It uses the same format, with a [WARN] prefix.
  • Add tests/test-bootstrap-helpers.sh. The test reads the top-level script (it skips heredoc bodies, because they run in a different shell) and makes sure that each log helper the script calls is also defined. pack-tests.yml finds it by its name.

Tests

  • bash tests/test-bootstrap-helpers.sh on main: 1 failure ("warn is called at top level but not defined"), exit 1.
  • With the fix: 5 passed, exit 0.
  • bash -n deploy/bootstrap.sh: no syntax errors.

Not tested

  • I did not run shellcheck locally (it is not installed on this host). CI runs it.
  • I did not run the bootstrap on a real EC2 instance.

Crew: Drew (Kiro Crew Issue Radar)

deploy/bootstrap.sh calls warn at three top-level lines (cfn-bootstrap
install, user runtime dir wait, pack shell profile). The script defines
only step, ok, fail and info. Under set -euo pipefail, the missing
command stops the bootstrap at the first warning.

Add warn() next to the other log helpers. Add
tests/test-bootstrap-helpers.sh. The test reads the top-level script
(it skips heredoc bodies) and makes sure that each log helper the
script calls is also defined. The test fails on main and passes with
the fix.

Crew: Drew (Kiro Crew Issue Radar)
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-11T12:54:53.092993Z 232c8de PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

This branch has not been deployed

No deployments
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.

deploy/bootstrap.sh: warn() is not defined, so a warning stops the bootstrap

1 participant