Skip to content

Commit

Permalink
Merge pull request #40 from sj26/artifact-skip-directories
Browse files Browse the repository at this point in the history
Skip directories when collecting artifacts
  • Loading branch information
keithpitt committed Jun 23, 2014
2 parents 450bc0a + a7d441f commit 550f936
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions buildbox/artifact.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,12 @@ func CollectArtifacts(job *Job, artifactPaths string) (artifacts []*Artifact, er
return nil, err
}

fileInfo, err := os.Stat(absolutePath)
if fileInfo.IsDir() {
Logger.Debugf("Skipping directory %s", file)
continue
}

artifact, err := BuildArtifact(file, absolutePath, glob)
if err != nil {
return nil, err
Expand Down

0 comments on commit 550f936

Please sign in to comment.