Skip to content

Commit

Permalink
fix(cdk): component install fails
Browse files Browse the repository at this point in the history
Fix file moves across devices causing component install to fail

Signed-off-by: Timothy MacDonald <tim.macdonald@lacework.net>
  • Loading branch information
tmac1973 authored and afiune committed Nov 15, 2023
1 parent 0b65cd9 commit 6ca5341
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lwcomponent/component.go
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ func (s State) Install(component *Component, version string) error {
//if the component was not an archive then nothing was created in the staging dir
//we must move it over
if _, err := os.Stat(stagingPath); errors.Is(err, os.ErrNotExist) {
err = os.Rename(downloadPath, stagingPath)
err = file.Copy(downloadPath, stagingPath)
if err != nil {
return err
}
Expand Down

0 comments on commit 6ca5341

Please sign in to comment.