Skip to content

Commit

Permalink
gp --exclusion new flag
Browse files Browse the repository at this point in the history
  • Loading branch information
sarao1310 committed Jul 9, 2023
1 parent 251fff9 commit 8ca7332
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions artifactory/commands/golang/archive.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ func archiveProject(writer io.Writer, dir, mod, version string, excludedPatterns
if err != nil {
return err
}
excludePathPattern := fspatterns.PrepareExcludePathPattern(excludedPatterns, utils.GetPatternType(utils.PatternTypes{RegExp: false, Ant: false}), true)
excludePatternsStr := fspatterns.PrepareExcludePathPattern(excludedPatterns, utils.GetPatternType(utils.PatternTypes{RegExp: false, Ant: false}), true)
var files []gozip.File
err = filepath.Walk(dir, func(filePath string, info os.FileInfo, err error) error {
if err != nil {
Expand Down Expand Up @@ -121,7 +121,7 @@ func archiveProject(writer io.Writer, dir, mod, version string, excludedPatterns
}

if info.Mode().IsRegular() {
excluded, err := isPathExcluded(filePath, excludePathPattern)
excluded, err := isPathExcluded(filePath, excludePatternsStr)
if err != nil {
return err
}
Expand Down

0 comments on commit 8ca7332

Please sign in to comment.