Skip to content

Commit

Permalink
Support globs in repository names
Browse files Browse the repository at this point in the history
  • Loading branch information
andornaut committed Jul 30, 2018
1 parent e20cce1 commit e75fde2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions repository/repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit e75fde2

Please sign in to comment.