Skip to content

Commit

Permalink
add comment explaining why we ignore the rename error
Browse files Browse the repository at this point in the history
Signed-off-by: Brian Downs <[email protected]>
  • Loading branch information
briandowns committed Aug 31, 2020
1 parent 2606e70 commit d5aadbd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/bootstrap/bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit d5aadbd

Please sign in to comment.