From d5aadbdd54b561e025cf3b696a2ab09009d442a7 Mon Sep 17 00:00:00 2001 From: Brian Downs Date: Mon, 31 Aug 2020 16:39:50 -0700 Subject: [PATCH] add comment explaining why we ignore the rename error Signed-off-by: Brian Downs --- pkg/bootstrap/bootstrap.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/bootstrap/bootstrap.go b/pkg/bootstrap/bootstrap.go index 97794e6d6d..e0802525e1 100644 --- a/pkg/bootstrap/bootstrap.go +++ b/pkg/bootstrap/bootstrap.go @@ -169,6 +169,10 @@ func extractFromDir(dir, prefix string, img v1.Image, imgName string) error { return err } + // we're ignoring and returned errors since the likelihood here is that + // the error is that the new path already exists. That's indicative of a + // previously bootstrapped system. If it's a different error, it's indicative + // of an operating system or filesystem issue. if err := os.Rename(tempDir, dir); err == nil { return nil }