Skip to content

Use bash, not sh, for local-exec interpreter#32

Merged
ethanholz merged 1 commit intoomsf:mainfrom
dwhswenson:use-bash-not-sh
Mar 30, 2026
Merged

Use bash, not sh, for local-exec interpreter#32
ethanholz merged 1 commit intoomsf:mainfrom
dwhswenson:use-bash-not-sh

Conversation

@dwhswenson
Copy link
Copy Markdown
Member

This had worked fine locally, where I guess sh is symlinked to bash. However, real sh doesn't allow the set -o pipefail, so we need to use bash for this to deploy correctly in GitHub Actions.

This had worked fine locally, where I guess `sh` is symlinked to `bash`.
However, real `sh` doesn't allow the `set -o pipefail`, so we need to
use bash for this to deploy correctly in GitHub Actions.
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates Terraform local-exec provisioners to run under bash rather than sh, ensuring set -euo pipefail works reliably in GitHub Actions and other environments where /bin/sh is not bash.

Changes:

  • Switched local-exec interpreter from ["/bin/sh", "-c"] to ["/bin/bash", "-c"] in the image build/publish/republish modules.
  • Aligns shell behavior with the scripts’ existing reliance on pipefail.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
modules/lambda-image-republish/main.tf Use /bin/bash for the republish local-exec script so pipefail is supported.
modules/lambda-image-public/main.tf Use /bin/bash for the public image build/push local-exec script.
modules/lambda-image-build/main.tf Use /bin/bash for the private image build/push local-exec script.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@dwhswenson dwhswenson requested a review from ethanholz March 30, 2026 22:26
@ethanholz ethanholz merged commit 0f882be into omsf:main Mar 30, 2026
5 checks passed
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.

3 participants