Skip to content
Snippets Groups Projects
Unverified Commit 7176870e authored by Mike McQuaid's avatar Mike McQuaid Committed by GitHub
Browse files

Merge pull request #10249 from hyuraku/cmd/info_refactor-github_info

cmd/info: refactor-github_info
parents 50ffa382 d2c0fdfb
No related branches found
No related tags found
No related merge requests found
......@@ -215,20 +215,14 @@ module Homebrew
end
def github_info(f)
if f.tap
if remote = f.tap.remote
path = if f.class.superclass == Formula
f.path.relative_path_from(f.tap.path)
elsif f.is_a?(Cask::Cask)
f.sourcefile_path.relative_path_from(f.tap.path)
end
github_remote_path(remote, path)
else
f.path
end
else
f.path
return f.path if f.tap.blank? || f.tap.remote.blank?
path = if f.class.superclass == Formula
f.path.relative_path_from(f.tap.path)
elsif f.is_a?(Cask::Cask)
f.sourcefile_path.relative_path_from(f.tap.path)
end
github_remote_path(f.tap.remote, path)
end
def info_formula(f, args:)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment