Skip to content

Commit

Permalink
Merge pull request #51 from ryotarai/look-remote-repo-url
Browse files Browse the repository at this point in the history
`look` command accepts remote repository url too.
  • Loading branch information
motemen committed Feb 27, 2015
2 parents ab1986b + 4ba5c6a commit bdfcba5
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,20 @@ func doLook(c *cli.Context) {
}
})

if len(reposFound) == 0 {
url, err := NewURL(name)

if err == nil {
repo := LocalRepositoryFromURL(url)
_, err := os.Stat(repo.FullPath)

// if the directory exists
if err == nil {
reposFound = append(reposFound, repo)
}
}
}

switch len(reposFound) {
case 0:
utils.Log("error", "No repository found")
Expand Down

0 comments on commit bdfcba5

Please sign in to comment.