Skip to content

added support for bash native flags e,o,x - #44

Merged
unfor19 merged 3 commits into
masterfrom
bugfix/43-set-flags
Feb 12, 2025
Merged

added support for bash native flags e,o,x#44
unfor19 merged 3 commits into
masterfrom
bugfix/43-set-flags

Conversation

@unfor19

@unfor19 unfor19 commented Feb 12, 2025

Copy link
Copy Markdown
Owner

Fixes - #43

This pull request includes several changes to improve the handling of bash script settings and update the README documentation. The most important changes include the addition of functions to save and restore bash settings in bargs.sh, and updates to the README.md file to correct the numbering and remove unnecessary instructions.

Improvements to bash script settings:

  • bargs.sh: Added functions to check and save the current status of set -e, set -x, and set -o pipefail, and to restore these settings before exiting the script or handling errors. [1] [2] [3] [4]
  • example.sh: Changed the shebang to use #!/usr/bin/env bash and added set -eo pipefail to ensure the script exits on errors and handles pipeline failures properly.

Documentation updates:

  • README.md: Removed the instruction to avoid set -o pipefail before sourcing bargs.sh.
  • README.md: Corrected the numbering of steps in the setup instructions. [1] [2]

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