Skip to content

Implement bash set options and traps#38

Draft
BlakeASmith wants to merge 2 commits intomainfrom
cursor/CLI-32-implement-bash-set-options-and-traps-7b96
Draft

Implement bash set options and traps#38
BlakeASmith wants to merge 2 commits intomainfrom
cursor/CLI-32-implement-bash-set-options-and-traps-7b96

Conversation

@BlakeASmith
Copy link
Contributor

Add # set strict and # trap cleanup safety macros to lower the mental load for robust bash scripting.


Linear Issue: CLI-32

Open in Cursor Open in Web

Co-authored-by: blakeinvictoria <blakeinvictoria@gmail.com>
@cursor
Copy link

cursor bot commented Aug 27, 2025

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Bugbot free trial expires on September 9, 2025
Learn more in the Cursor dashboard.

"""Generate strict bash mode settings."""
# Default strict mode: exit on error, undefined vars, pipe failures
return "set -eou --pipefail"

Copy link

Choose a reason for hiding this comment

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

Bug: Bash Syntax Error in set_strict Macro

The set_strict macro generates invalid bash syntax with set -eou --pipefail. Bash's set command doesn't support --pipefail; it requires -o pipefail. Additionally, the -o flag in -eou expects an argument, making the combined flags incorrect. This will lead to runtime syntax errors.

Fix in Cursor Fix in Web

…ndling

Co-authored-by: blakeinvictoria <blakeinvictoria@gmail.com>
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