Skip to content

Commit 764c6fe

Browse files
Merge pull request #728 from joelanford/ocpbugs-31842
OCPBUGS-31842: copy-content: delete destination dirs before copying (#3197)
2 parents 0a14440 + c7c5a73 commit 764c6fe

File tree

2 files changed

+8
-0
lines changed
  • staging/operator-lifecycle-manager/cmd/copy-content
  • vendor/github.com/operator-framework/operator-lifecycle-manager/cmd/copy-content

2 files changed

+8
-0
lines changed

staging/operator-lifecycle-manager/cmd/copy-content/main.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ func main() {
3131
*catalogSource: *catalogDestination,
3232
*cacheSource: *cacheDestination,
3333
} {
34+
if err := os.RemoveAll(to); err != nil {
35+
fmt.Printf("failed to remove %s: %s", to, err)
36+
os.Exit(1)
37+
}
3438
if err := copy.Copy(from, to); err != nil {
3539
fmt.Printf("failed to copy %s to %s: %s\n", from, to, err)
3640
os.Exit(1)

vendor/github.com/operator-framework/operator-lifecycle-manager/cmd/copy-content/main.go

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)