Skip to content

Commit

Permalink
see if env is already available
Browse files Browse the repository at this point in the history
  • Loading branch information
garethr committed May 8, 2011
1 parent 56ea52f commit eba0433
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions lib/vagrantboxes/command.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,7 @@ def url(id=nil)
desc "add [ID]", "Download and add the box to your vagrant installation"
method_option :api
def add(id=nil)
base = options[:api] ? options[:api] : ENDPOINT
if id =~ /^[-+]?[0-9]+$/
url = "#{base}/boxes/#{id}.json"
result = request(url)
env = Vagrant::Environment.new
Vagrant::Box.add(env, result['title'], result['url'])
end
#Vagrantboxes::Client.add(id, options[:api])
Vagrantboxes::Client.add(id, options[:api])
end

end
Expand Down

0 comments on commit eba0433

Please sign in to comment.