Skip to content
This repository has been archived by the owner on Sep 1, 2020. It is now read-only.

Commit

Permalink
fix reading git remote URLs on Ruby 1.8.7
Browse files Browse the repository at this point in the history
Strip extra whitespace in the end because URI.parse chokes on it.

Fixes #49, closes #50, closes #51
  • Loading branch information
mislav committed Sep 27, 2013
1 parent 6cd5a72 commit a1cb0a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/git_deploy/configuration.rb
Expand Up @@ -36,7 +36,7 @@ def git_config
def remote_urls(remote)
git_config["remote -v"].to_s.split("\n").
select {|l| l =~ /^#{remote}\t/ }.
map {|l| l.split("\t")[1].sub(/\(.+?\)$/, '') }
map {|l| l.split("\t")[1].sub(/\s+\(.+?\)$/, '') }
end

def remote_url(remote = options[:remote])
Expand Down

0 comments on commit a1cb0a7

Please sign in to comment.