Skip to content

Commit

Permalink
Merge pull request #5756 from MikeMcQuaid/update-untap
Browse files Browse the repository at this point in the history
Improve handling of deleted taps.
  • Loading branch information
MikeMcQuaid authored Feb 17, 2019
2 parents 2864ed9 + ae7492f commit 117c24f
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 8 deletions.
4 changes: 0 additions & 4 deletions Library/Homebrew/cmd/doctor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ def doctor_args
description: "Enable debugging and profiling of audit methods."
switch :verbose
switch :debug

# Undocumented options:
# `-D` activates debugging and profiling of the doctor methods (not the same as `--debug`)
# `--list-checks` lists all doctor methods
end
end

Expand Down
8 changes: 7 additions & 1 deletion Library/Homebrew/cmd/update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
) &
Expand Down
3 changes: 0 additions & 3 deletions Library/Homebrew/dev-cmd/audit.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,6 @@ def audit_args
switch :debug
conflicts "--only", "--except"
conflicts "--only-cops", "--except-cops"

# Undocumented options:
# `-D` activates debugging and profiling of the audit methods (not the same as `--debug`)
end
end

Expand Down
12 changes: 12 additions & 0 deletions Library/Homebrew/diagnostic.rb
Original file line number Diff line number Diff line change
Expand Up @@ -604,6 +604,18 @@ def check_coretap_git_branch
EOS
end

def check_deprecated_official_taps
tapped_deprecated_taps =
Tap.select(&:official?).map(&:repo) & DEPRECATED_OFFICIAL_TAPS
return if tapped_deprecated_taps.empty?

<<~EOS
You have the following deprecated, official taps tapped:
Homebrew/homebrew-#{tapped_deprecated_taps.join("\n ")}
Untap them with `brew untap`.
EOS
end

def __check_linked_brew(f)
f.installed_prefixes.each do |prefix|
prefix.find do |src|
Expand Down

0 comments on commit 117c24f

Please sign in to comment.