doubledash hygiene for external cmd: open
This commit is contained in:
parent
6038fd221d
commit
06395054d6
|
@ -2,12 +2,12 @@ module Cask::CLI::Home
|
|||
def self.run(*cask_names)
|
||||
if cask_names.empty?
|
||||
odebug "Opening project homepage"
|
||||
system "/usr/bin/open", 'http://caskroom.io/'
|
||||
system "/usr/bin/open", '--', 'http://caskroom.io/'
|
||||
else
|
||||
cask_names.each do |cask_name|
|
||||
odebug "Opening homepage for Cask #{cask_name}"
|
||||
cask = Cask.load(cask_name)
|
||||
system "/usr/bin/open", cask.homepage
|
||||
system "/usr/bin/open", '--', cask.homepage
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -26,22 +26,22 @@ describe Cask::CLI::Home do
|
|||
it 'opens the homepage for the specified cask' do
|
||||
Cask::CLI::Home.run('alfred')
|
||||
Cask::CLI::Home.system_commands.must_equal [
|
||||
['/usr/bin/open', 'http://www.alfredapp.com/']
|
||||
['/usr/bin/open', '--', 'http://www.alfredapp.com/']
|
||||
]
|
||||
end
|
||||
|
||||
it 'works for multiple casks' do
|
||||
Cask::CLI::Home.run('alfred', 'adium')
|
||||
Cask::CLI::Home.system_commands.must_equal [
|
||||
['/usr/bin/open', 'http://www.alfredapp.com/'],
|
||||
['/usr/bin/open', 'https://www.adium.im/']
|
||||
['/usr/bin/open', '--', 'http://www.alfredapp.com/'],
|
||||
['/usr/bin/open', '--', 'https://www.adium.im/']
|
||||
]
|
||||
end
|
||||
|
||||
it "opens the project page when no cask is specified" do
|
||||
Cask::CLI::Home.run
|
||||
Cask::CLI::Home.system_commands.must_equal [
|
||||
['/usr/bin/open', 'http://caskroom.io/'],
|
||||
['/usr/bin/open', '--', 'http://caskroom.io/'],
|
||||
]
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue