8000 Fix missed errors in weave script by bboreham · Pull Request #2054 · weaveworks/weave · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Jun 20, 2024. It is now read-only.

Fix missed errors in weave script #2054

Merged
merged 1 commit into from
Mar 17, 2016
Merged

Fix missed errors in weave script #2054

merged 1 commit into from
Mar 17, 2016

Conversation

bboreham
Copy link
Contributor

Fixes #2053

Return failure from various functions when sub-operation fails.
We cannot rely on set -e to fail the whole script in contexts where functions are called inside conditionals.

@bboreham bboreham added this to the 1.5.0 milestone Mar 17, 2016
@@ -948,7 +948,7 @@ args_match() {
prev_args="$(docker inspect -f '{{.Args}} {{.Config.Env}}' $1)"
shift
dummy_container=$(docker create "$@" 2>/dev/null) || return 1
dummy_args="$(docker inspect -f '{{.Args}} {{.Config.Env}}' $dummy_container)"
dummy_args="$(docker inspect -f '{{.Args}} {{.Config.Env}}' $dummy_container)" || return 1

This comment was marked as abuse.

This comment was marked as abuse.

We cannot rely on `set -e` to fail the whole script in contexts
where functions are called inside conditionals.
@bboreham bboreham force-pushed the issues/2053-errexit branch from b79dcdb to 0705319 Compare March 17, 2016 15:03
rade added a commit that referenced this pull request Mar 17, 2016
Fix missed errors in weave script

Fixes #2053.
@rade rade merged commit cd9b7bf into master Mar 17, 2016
rade added a commit that referenced this pull request Mar 17, 2016
...for calling in a context w/o 'set -e', even though right now they
always are.

Follow-on of #2054.
@rade rade deleted the issues/2053-errexit branch March 19, 2016 16:38
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0