From 50b93bf17932267d900ddc18c88c43f8f4295ecb Mon Sep 17 00:00:00 2001 From: Simon Mo Date: Tue, 6 Aug 2019 17:30:33 -0700 Subject: [PATCH] Check upstream with `git remote` (#5377) --- ci/travis/format.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/travis/format.sh b/ci/travis/format.sh index aec3b4bc3..26b23486b 100755 --- a/ci/travis/format.sh +++ b/ci/travis/format.sh @@ -17,8 +17,8 @@ builtin cd "$(dirname "${BASH_SOURCE:-$0}")" ROOT="$(git rev-parse --show-toplevel)" builtin cd "$ROOT" || exit 1 -# Add the upstream branch if it doesn't exist -if ! [[ -e "$ROOT/.git/refs/remotes/upstream" ]]; then +# Add the upstream remote if it doesn't exist +if ! git remote -v | grep -q upstream; then git remote add 'upstream' 'https://github.com/ray-project/ray.git' fi