From b82f77ee50b6ffc7df8de5d1741b63d1fdc4d14a Mon Sep 17 00:00:00 2001 From: KUOKA Yusuke Date: Tue, 25 Jun 2019 20:06:07 +0900 Subject: [PATCH] fix: Absolute paths for -f not working on Windows (#721) Fixes #718 --- pkg/remote/remote.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/remote/remote.go b/pkg/remote/remote.go index ca60f88b..0f70dc4a 100644 --- a/pkg/remote/remote.go +++ b/pkg/remote/remote.go @@ -80,6 +80,9 @@ func (r *Remote) GetBytes(goGetterSrc string) ([]byte, error) { // If the argument was an URL, it fetches the remote directory contained within the URL, // and returns the path to the file in the fetched directory func (r *Remote) Locate(urlOrPath string) (string, error) { + if r.FileExists(urlOrPath) || r.DirExists(urlOrPath) { + return urlOrPath, nil + } fetched, err := r.Fetch(urlOrPath) if err != nil { switch err.(type) {