Treat path-like specs as paths
This commit is contained in:
4
main.go
4
main.go
@@ -130,6 +130,10 @@ func resolvePackageSpec(spec string) (string, string, error) {
|
||||
return resolvePathSpec(spec, repoAbs)
|
||||
}
|
||||
|
||||
if strings.Contains(spec, string(os.PathSeparator)) {
|
||||
return resolvePathSpec(spec, repoAbs)
|
||||
}
|
||||
|
||||
clean := filepath.Clean(spec)
|
||||
if strings.HasPrefix(clean, ".") || strings.HasPrefix(clean, string(os.PathSeparator)) {
|
||||
return resolvePathSpec(clean, repoAbs)
|
||||
|
||||
Reference in New Issue
Block a user