Skip to content

Commit

Permalink
Fix the crowbar cli to process url properly.
Browse files Browse the repository at this point in the history
  • Loading branch information
galthaus committed Apr 30, 2015
1 parent 3ef61ab commit f8990e0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion bin/crowbar
Expand Up @@ -157,7 +157,11 @@ class REST

# Common data and debug handling.
def self.go(verb,path,data=nil)
uri = URI.parse("http://#{$hostname}:#{$port}/#{path}" )
if $url
uri = URI.parse("#{$url}/#{path}" )
else
uri = URI.parse("http://#{$hostname}:#{$port}/#{path}" )
end
# We want to give valid JSON to the API, so if we were
# handed an array or a hash as the data to be messed with,
# turn it into a blob of JSON.
Expand Down

0 comments on commit f8990e0

Please sign in to comment.