From e75fde22340d05123380dc5e22f29b1d65dd1836 Mon Sep 17 00:00:00 2001 From: andornaut Date: Mon, 30 Jul 2018 16:44:26 -0400 Subject: [PATCH] Support globs in repository names --- repository/repository.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/repository/repository.go b/repository/repository.go index fe97200..35c680f 100644 --- a/repository/repository.go +++ b/repository/repository.go @@ -78,6 +78,13 @@ func RootPath(name string) (string, error) { return "", err } p := path.Join(BaseDir, name) + globPaths, err := filepath.Glob(p + "*") + if err != nil { + return "", err + } + if globPaths != nil { + p = globPaths[0] + } if err := validateRepoPath(p); err != nil { return "", err }