Skip to content

Commit c7c5a73

Browse files
committed
copy-content: delete destination dirs before copying (#3197)
Signed-off-by: Joe Lanford <[email protected]> Upstream-repository: operator-lifecycle-manager Upstream-commit: 3ed3c63ea9f724da7d51062ab7f21da611dc6628
1 parent 0a14440 commit c7c5a73

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)