Skip to content

fix: Do not always run the exit trap and return with 1 even if everything is fine - #110

Merged
AaronFeledy merged 4 commits into
lando:mainfrom
florianPat:exit-not-always-1
Jan 3, 2026
Merged

AaronFeledy merged 4 commits into
lando:mainfrom
florianPat:exit-not-always-1

Conversation

@florianPat

@florianPat florianPat commented Jan 2, 2026 •

Copy link
Copy Markdown
Contributor

The script returns with exit code 1 even if the "exit 0" in the end is run.
This is due to the trap that always triggers...
I now just reset the trap after the user interaction.
Is that the right approach?


Note

Prevents unintended non-zero exits caused by an overbroad trap in interactive flow.

  • Updates wait_for_user to trap only SIGINT (Ctrl-C), removing EXIT so the cleanup handler no longer runs on normal script completion

Written by Cursor Bugbot for commit 0c422f0. This will update automatically on new commits. Configure here.

@netlify

netlify Bot commented Jan 2, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for setup-lando ready!

Name Link
🔨 Latest commit 0c422f0
🔍 Latest deploy log https://app.netlify.com/projects/setup-lando/deploys/6959a37ade96a7000875bf77
😎 Deploy Preview https://deploy-preview-110--setup-lando.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 47 (🔴 down 7 from production)
Accessibility: 98 (no change from production)
Best Practices: 100 (no change from production)
SEO: 100 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Jan 2, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for get-lando canceled.

Name Link
🔨 Latest commit 0c422f0
🔍 Latest deploy log https://app.netlify.com/projects/get-lando/deploys/6959a37a5d489b0008e9b431

@pirog

pirog commented Jan 2, 2026

Copy link
Copy Markdown
Member

looking at this again i think the issue is trap 'stty sane; tput sgr0; echo; exit 1' SIGINT EXIT should actually be trap 'stty sane; tput sgr0; echo; exit 1' SIGINT eg we only trap something like CTRL-C and not EXIT itself.

@florianPat

Copy link
Copy Markdown
Contributor Author

That makes sense, I changed that and amended :)

@AaronFeledy
AaronFeledy merged commit 548506b into lando:main Jan 3, 2026
11 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