From 49117d619a33a81857242e616049a55770b9c56d Mon Sep 17 00:00:00 2001 From: William Petit Date: Tue, 7 Apr 2020 08:43:18 +0200 Subject: [PATCH] Local Fetcher: fix path detection --- internal/project/local.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/internal/project/local.go b/internal/project/local.go index a0ddcfb..0d8bbfa 100644 --- a/internal/project/local.go +++ b/internal/project/local.go @@ -21,7 +21,11 @@ func (f *LocalFetcher) Match(url *url.URL) bool { return true } - return isFilesystemPath(url.Path) + if url.Scheme == "" && isFilesystemPath(url.Path) { + return true + } + + return false } func NewLocalFetcher() *LocalFetcher { @@ -29,5 +33,5 @@ func NewLocalFetcher() *LocalFetcher { } func isFilesystemPath(path string) bool { - return strings.HasPrefix(path, "./") || strings.HasPrefix(path, "/") + return strings.HasPrefix(path, ".") || strings.HasPrefix(path, "/") }