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

chore(docker-tag): do not fail if tag already exists - v3 #176

Merged
merged 5 commits into from
Oct 21, 2024

Conversation

floriantz
Copy link
Contributor

@floriantz floriantz commented Oct 21, 2024

Third try to make this change, github workflows actually sets shell: bash -e {0} by default cf doc which makes an intermediate command failure fail the entire script.

Setting shell: bash {0} to override the default should finally fix the issue.

@floriantz floriantz requested a review from a team as a code owner October 21, 2024 14:32
@jdassonvil
Copy link
Contributor

jdassonvil commented Oct 21, 2024

you are replacing something non explicit by something else non explicit
you should use set +e instead at the beginning of the script

you might also set more flags to avoid surprises: http://redsymbol.net/articles/unofficial-bash-strict-mode/

@floriantz
Copy link
Contributor Author

you are replacing something non explicit by something else non explicit you should use set +e instead at the beginning of the script

you might also set more flags to avoid surprises: http://redsymbol.net/articles/unofficial-bash-strict-mode/

I think setting +e should be enough in this case right ?

@jdassonvil
Copy link
Contributor

yes it is enough
but what we should do all the time is begin all bash script by the strict mode instructions (I don't so I also blame myself here)
and then changes the flags when necessary

@floriantz floriantz merged commit a5f55eb into master Oct 21, 2024
1 check passed
@floriantz floriantz deleted the chore/do-not-fail-if-tag-already-exists branch October 21, 2024 15:33
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