Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1825 from weaveworks/1824-idempotent-env-restore
Browse files Browse the repository at this point in the history
make `eval $(weave env)` idempotent; LGTM.  Fixes #1824
  • Loading branch information
bboreham committed Dec 23, 2015
2 parents ba266ef + c7c669f commit b45ac75
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion weave
Original file line number Diff line number Diff line change
Expand Up @@ -1880,7 +1880,8 @@ EOF
env|proxy-env)
[ "$COMMAND" = "env" ] || deprecation_warning "$COMMAND" "'weave env'"
if PROXY_ADDR=$(proxy_addr) ; then
echo "export DOCKER_HOST=$PROXY_ADDR ORIG_DOCKER_HOST=$DOCKER_CLIENT_HOST"
[ "$PROXY_ADDR" = "$DOCKER_CLIENT_HOST" ] || RESTORE="ORIG_DOCKER_HOST=$DOCKER_CLIENT_HOST"
echo "export DOCKER_HOST=$PROXY_ADDR $RESTORE"
fi
;;
config|proxy-config)
Expand Down

0 comments on commit b45ac75

Please sign in to comment.