Skip to content

Commit

Permalink
fix: component install windows (#1543)
Browse files Browse the repository at this point in the history
  • Loading branch information
jon-stewart authored Feb 20, 2024
1 parent 5455e17 commit 6c906b5
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions lwcomponent/staging.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (

"github.com/Masterminds/semver"
"github.com/lacework/go-sdk/internal/file"
dircopy "github.com/otiai10/copy"
"github.com/pkg/errors"
)

Expand Down Expand Up @@ -73,21 +74,10 @@ func (s *stageTarGz) Commit(targetDir string) (err error) {
return
}

dirEntries, err := os.ReadDir(s.dir)
if err != nil {
if err = dircopy.Copy(s.dir, targetDir); err != nil {
return
}

for _, entry := range dirEntries {
src := filepath.Join(s.dir, entry.Name())
dst := filepath.Join(targetDir, entry.Name())

err = os.Rename(src, dst)
if err != nil {
return err
}
}

return
}

Expand Down

0 comments on commit 6c906b5

Please sign in to comment.