Formatting in brew-switch
This commit is contained in:
parent
fb70374dac
commit
bf8c8dc3f8
@ -2,7 +2,7 @@ require 'formula'
|
|||||||
require 'keg'
|
require 'keg'
|
||||||
|
|
||||||
if ARGV.named.length != 2
|
if ARGV.named.length != 2
|
||||||
onoe "Usage: brew switch formula version"
|
onoe "Usage: brew switch <formula> <version>"
|
||||||
exit 1
|
exit 1
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -19,7 +19,7 @@ end
|
|||||||
|
|
||||||
# Does the target version exist?
|
# Does the target version exist?
|
||||||
unless (cellar+version).directory?
|
unless (cellar+version).directory?
|
||||||
onoe "#{name} does not have a version #{version} in the Cellar."
|
onoe "#{name} does not have a version \"#{version}\" in the Cellar."
|
||||||
|
|
||||||
versions = cellar.children.select { |pn| pn.directory? }.collect { |pn| pn.basename.to_s }
|
versions = cellar.children.select { |pn| pn.directory? }.collect { |pn| pn.basename.to_s }
|
||||||
puts "Versions available: #{versions.join(', ')}"
|
puts "Versions available: #{versions.join(', ')}"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user