diff --git a/lib/homesick.rb b/lib/homesick.rb index 4620765..5f6650e 100644 --- a/lib/homesick.rb +++ b/lib/homesick.rb @@ -34,7 +34,7 @@ class Homesick < Thor ln_s uri, destination elsif uri =~ GITHUB_NAME_REPO_PATTERN - destination = Pathname.new($1.split("/")[1]) + destination = Pathname.new(uri).basename git_clone "https://github.com/#{$1}.git", :destination => destination elsif uri =~ /%r([^%r]*?)(\.git)?\Z/ destination = Pathname.new($1)