Skip to content

Commit

Permalink
Fix brew cask style with relative paths.
Browse files Browse the repository at this point in the history
  • Loading branch information
reitermarkus committed Oct 17, 2018
1 parent 178db5d commit a838b37
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Library/Homebrew/cask/cmd/style.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def cask_paths
@cask_paths ||= if args.empty?
Tap.map(&:cask_dir).select(&:directory?)
elsif args.any? { |file| File.exist?(file) }
args
args.map { |path| Pathname(path).expand_path }
else
casks.map(&:sourcefile_path)
end
Expand Down
5 changes: 4 additions & 1 deletion Library/Homebrew/test/cask/cmd/style_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,10 @@
end

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

Expand Down

0 comments on commit a838b37

Please sign in to comment.