Skip to content

Commit

Permalink
Ignore glob matches which are not directories
Browse files Browse the repository at this point in the history
  • Loading branch information
bkochendorfer committed Oct 22, 2018
1 parent 30a664a commit b84f104
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pkg/uroot/uroot.go
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,14 @@ func resolvePackagePath(logger *log.Logger, env golang.Environ, pkg string) ([]s

var importPaths []string
for _, match := range matches {

// Only match directories for building.
// Skip anything that is not a directory
fileInfo, _ := os.Stat(match)
if !fileInfo.IsDir() {
continue
}

p, err := env.PackageByPath(match)
if err != nil {
logger.Printf("Skipping package %q: %v", match, err)
Expand Down

0 comments on commit b84f104

Please sign in to comment.