Skip to content

Commit

Permalink
work harder to detect busted gcloud dirs (#147)
Browse files Browse the repository at this point in the history
If a gcloud download and unpack failed midway, it might leave a directory with a
few files, but not all that we need. We could probably do with a manifest of
some kind, but this is patch that checks for the gcloud binary fixes the current
problem.
  • Loading branch information
jmhodges committed Dec 2, 2016
1 parent f0c634c commit 1de573e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion travis_docker_push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ fi

function auth_gcloud() {
export CLOUDSDK_CORE_DISABLE_PROMPTS=1
if [ ! -d ${HOME}/google-cloud-sdk/bin ]; then
if [[ ! -d ${HOME}/google-cloud-sdk/bin || ! -f ${HOME}/google-cloud-sdk/bin/gcloud ]]; then
# If there's no cache, TravisCI will put an empty directory there, which
# gcloud's install script errors out on. So, delete it and do the download
rm -rf ${HOME}/google-cloud-sdk
Expand Down

0 comments on commit 1de573e

Please sign in to comment.