Skip to content

Fix Bash script - #16

Open
housni wants to merge 1 commit into
aws-samples:mainfrom
housni:fix-bash-script
Open

Fix Bash script#16
housni wants to merge 1 commit into
aws-samples:mainfrom
housni:fix-bash-script

Conversation

@housni

@housni housni commented Jan 23, 2025

Copy link
Copy Markdown

This PR fixes two things:

  1. It move the shebang to the first line. If the shebang is not on the very first line, it's treated as a comment and ignored. I'm also using it in the format #!/usr/bin/env bash which is the more portable way to use a shebang since it queries the env for Bash instead of assuming it's installed at /bin/bash which is the most common location.
  2. It sets the pipefail option to true so that if a piped command fails, it will not be hidden and will instead terminate the entire script which will help us avoid potential problems.

…. Add pipefail option so that errors in a piped command cause the script to fail fast without masking it.
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.

1 participant