Merge pull request #5121 from reitermarkus/cask-style
Fix `brew cask style` with relative paths.
This commit is contained in:
commit
a89dd3efa2
@ -31,7 +31,7 @@ module Cask
|
|||||||
@cask_paths ||= if args.empty?
|
@cask_paths ||= if args.empty?
|
||||||
Tap.map(&:cask_dir).select(&:directory?)
|
Tap.map(&:cask_dir).select(&:directory?)
|
||||||
elsif args.any? { |file| File.exist?(file) }
|
elsif args.any? { |file| File.exist?(file) }
|
||||||
args
|
args.map { |path| Pathname(path).expand_path }
|
||||||
else
|
else
|
||||||
casks.map(&:sourcefile_path)
|
casks.map(&:sourcefile_path)
|
||||||
end
|
end
|
||||||
|
|||||||
@ -106,7 +106,10 @@ describe Cask::Cmd::Style, :cask do
|
|||||||
end
|
end
|
||||||
|
|
||||||
it "treats all tokens as paths" do
|
it "treats all tokens as paths" do
|
||||||
expect(subject).to eq(tokens)
|
expect(subject).to eq [
|
||||||
|
Pathname("adium").expand_path,
|
||||||
|
Pathname("Casks/dropbox.rb").expand_path,
|
||||||
|
]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user