From e7ce5dddb721869f169c69769d5f61601d271159 Mon Sep 17 00:00:00 2001 From: Mike McQuaid <mike@mikemcquaid.com> Date: Sat, 16 Feb 2019 19:57:56 +0000 Subject: [PATCH] update: recommend 'brew untap` if tap doesn't exist. We removed a few old, deprecated repos recently and people with them still tapped who get confused at the `brew update` error message. --- Library/Homebrew/cmd/update.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/cmd/update.sh b/Library/Homebrew/cmd/update.sh index 80384da032..b584e826c4 100644 --- a/Library/Homebrew/cmd/update.sh +++ b/Library/Homebrew/cmd/update.sh @@ -510,7 +510,13 @@ EOS if ! git fetch --tags --force "${QUIET_ARGS[@]}" origin \ "refs/heads/$UPSTREAM_BRANCH_DIR:refs/remotes/origin/$UPSTREAM_BRANCH_DIR" then - echo "Fetching $DIR failed!" >>"$update_failed_file" + if [[ "$UPSTREAM_SHA_HTTP_CODE" = "404" ]] + then + TAP="${DIR#$HOMEBREW_LIBRARY/Taps/}" + echo "$TAP does not exist! Run 'brew untap $TAP'" >>"$update_failed_file" + else + echo "Fetching $DIR failed!" >>"$update_failed_file" + fi fi fi ) & -- GitLab