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.
This commit is contained in:
Mike McQuaid 2019-02-16 19:57:56 +00:00
parent f3716fe2d8
commit e7ce5dddb7
No known key found for this signature in database
GPG Key ID: 48A898132FD8EE70

View File

@ -510,7 +510,13 @@ EOS
if ! git fetch --tags --force "${QUIET_ARGS[@]}" origin \ if ! git fetch --tags --force "${QUIET_ARGS[@]}" origin \
"refs/heads/$UPSTREAM_BRANCH_DIR:refs/remotes/origin/$UPSTREAM_BRANCH_DIR" "refs/heads/$UPSTREAM_BRANCH_DIR:refs/remotes/origin/$UPSTREAM_BRANCH_DIR"
then 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
fi fi
) & ) &