Also verify the "absoluteness" of the URL

This commit is contained in:
Tianon Gravi 2016-05-27 11:59:54 -07:00
parent 0b0d493724
commit e40181b728
1 changed files with 2 additions and 2 deletions

View File

@ -17,8 +17,8 @@ import (
func Fetch(dir, repo string) (string, *Manifest2822, error) {
repoName := path.Base(repo)
_, err := url.Parse(repo)
if err == nil {
u, err := url.Parse(repo)
if err == nil && u.IsAbs() {
// must be remote URL!
resp, err := http.Get(repo)
if err != nil {