Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip processing deleted directories during sourcebundle.Build #51

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.