Skip to content

Commit

Permalink
Merge pull request #51 from hashicorp/liamcervante/sourcebundle/skip-…
Browse files Browse the repository at this point in the history
…deleted-directories

Skip processing deleted directories during sourcebundle.Build
  • Loading branch information
liamcervante authored Nov 28, 2023
2 parents ffdd023 + fb32e28 commit bc4aefe
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
7 changes: 4 additions & 3 deletions sourcebundle/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@ import (
"sync"

"github.com/apparentlymart/go-versions/versions"
"github.com/hashicorp/go-slug/internal/ignorefiles"
"github.com/hashicorp/go-slug/sourceaddrs"
regaddr "github.com/hashicorp/terraform-registry-address"
"golang.org/x/mod/sumdb/dirhash"

"github.com/hashicorp/go-slug/internal/ignorefiles"
"github.com/hashicorp/go-slug/sourceaddrs"
)

// Builder deals with the process of gathering source code
Expand Down Expand Up @@ -651,7 +652,7 @@ func packagePrepareWalkFn(root string, ignoreRules *ignorefiles.Ruleset) filepat
if err != nil {
return fmt.Errorf("failed to remove ignored file %s: %s", relPath, err)
}
return nil
return filepath.SkipDir
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
excluded
excluded-dir/
Empty file.

0 comments on commit bc4aefe

Please sign in to comment.