Skip to content

Commit

Permalink
fix: exclude files also for inventory (#26)
Browse files Browse the repository at this point in the history
Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
  • Loading branch information
rchincha authored Apr 27, 2023
1 parent 42c5d7e commit c3736c9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/fs/inventory.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ func GenerateInventory(root string, exclude []string, output string) error {
return filepath.SkipDir
}

// skip excluded files
if isExcluded(path, exclude) {
return nil
}

// skip dirs for generating the inventory
if info.IsDir() {
return nil
Expand Down

0 comments on commit c3736c9

Please sign in to comment.