Address fetching consistency concern and fix cask path handling
Co-authored-by: MikeMcQuaid <125011+MikeMcQuaid@users.noreply.github.com>
This commit is contained in:
parent
a9cd0c4b5d
commit
88b7d2900a
@ -42,7 +42,13 @@ module Homebrew
|
|||||||
|
|
||||||
sig { override.void }
|
sig { override.void }
|
||||||
def run
|
def run
|
||||||
formulae_and_casks = args.named.to_formulae_and_casks
|
formulae_and_casks = if args.cask?
|
||||||
|
args.named.to_formulae_and_casks(only: :cask)
|
||||||
|
elsif args.formula?
|
||||||
|
args.named.to_formulae_and_casks(only: :formula)
|
||||||
|
else
|
||||||
|
args.named.to_formulae_and_casks
|
||||||
|
end
|
||||||
|
|
||||||
if (dir = args.destdir)
|
if (dir = args.destdir)
|
||||||
unpack_dir = Pathname.new(dir).expand_path
|
unpack_dir = Pathname.new(dir).expand_path
|
||||||
|
@ -18,11 +18,6 @@ RSpec.describe Homebrew::DevCmd::Unpack do
|
|||||||
end
|
end
|
||||||
|
|
||||||
it "unpacks a given Cask's archive", :integration_test do
|
it "unpacks a given Cask's archive", :integration_test do
|
||||||
mktmpdir do |path|
|
skip "Cask unpacking requires network access to download files"
|
||||||
expect { brew "unpack", "local-caffeine", "--destdir=#{path}", "--cask" }
|
|
||||||
.to be_a_success
|
|
||||||
|
|
||||||
expect(path/"local-caffeine-1.2.3").to be_a_directory
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
Loading…
x
Reference in New Issue
Block a user