From 7d30e4445e6599bc1196e6dafdc1e8d333cfe639 Mon Sep 17 00:00:00 2001 From: Ches Martin <ches@whiskeyandgrits.net> Date: Fri, 2 Aug 2013 04:44:14 +0700 Subject: [PATCH] brew-create: don't break when given --set-version Since 9f2782812cbaf2, specifying a version breaks with: Error: undefined method `detected_from_url?' for "1.2.2":String Signed-off-by: Adam Vandenberg <flangy@gmail.com> --- Library/Homebrew/cmd/create.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/cmd/create.rb b/Library/Homebrew/cmd/create.rb index ae192eb7b2..080a1dc8dd 100644 --- a/Library/Homebrew/cmd/create.rb +++ b/Library/Homebrew/cmd/create.rb @@ -84,7 +84,9 @@ class FormulaCreator else @path = Formula.path name end - if @version.nil? + if @version + @version = Version.new(@version) + else @version = Pathname.new(url).version end end -- GitLab