Also verify the "absoluteness" of the URL
This commit is contained in:
parent
0b0d493724
commit
e40181b728
|
|
@ -17,8 +17,8 @@ import (
|
||||||
func Fetch(dir, repo string) (string, *Manifest2822, error) {
|
func Fetch(dir, repo string) (string, *Manifest2822, error) {
|
||||||
repoName := path.Base(repo)
|
repoName := path.Base(repo)
|
||||||
|
|
||||||
_, err := url.Parse(repo)
|
u, err := url.Parse(repo)
|
||||||
if err == nil {
|
if err == nil && u.IsAbs() {
|
||||||
// must be remote URL!
|
// must be remote URL!
|
||||||
resp, err := http.Get(repo)
|
resp, err := http.Get(repo)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue