fix: Absolute paths for -f not working on Windows (#721)

Fixes #718
This commit is contained in:
KUOKA Yusuke 2019-06-25 20:06:07 +09:00 committed by GitHub
parent e6bb8282db
commit b82f77ee50
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -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) {