Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update set options to be stricter on when to exit #8

Merged
merged 1 commit into from
Aug 10, 2021

Conversation

kylecotter
Copy link
Contributor

@markhuot @dreadfullyposh Any reason not to use set -euo pipefail for the main cog script?

In this example, the script did not exit as I was intending, where adding the above fixed it:

  1. I have 2 cog commands, cog shell and cog build
  2. cog shell is a wrapper for docker-compose exec node
  3. cog build does a cog shell npm ci and a cog shell npm run build
  4. if the cog shell npm ci exits for any reason, cog build continues on to cog shell npm run build when it should exit entirely

Copy link
Contributor

@markhuot markhuot left a comment

Choose a reason for hiding this comment

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

No reason. It's an old script from before I knew about about all the options.

@dreadfullyposh dreadfullyposh merged commit d5c0793 into happycog:master Aug 10, 2021
@mrw
Copy link
Member

mrw commented Feb 14, 2023

@kylecotter @markhuot I merged this in and launched it as part of v0.8.2, but rolled it back for v0.8.3 because there were a lot of unchecked variables etc that were causing the whole script to fail when -uo are in the set line. I'd like to see this made stricter/those options put in, but I think we'll need to check a bunch of that over before adding it again. Adding -v temporarily shows where it stops processing.

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.

4 participants