Skip to content
This repository has been archived by the owner on Jun 28, 2023. It is now read-only.

Use io.Copy instead of os.Rename for bom downloading in local plugin #2310

Merged

Conversation

jpmcb
Copy link
Contributor

@jpmcb jpmcb commented Oct 21, 2021

What this PR does / why we need it

  • Uses io.Copy with two open open file buffers instead of using os.Rename which would throw deep linking errors
  • Checks if the expected bom file name is already present in the local bom file directory

Details for the Release Notes (PLEASE PROVIDE)

N/a

Which issue(s) this PR fixes

Related to #2266

Describe testing done for PR

  • rm -rf ~/.config/tanzu
  • Build and ran local create cluster
  • Directory populated
  • Ran local create cluster again and bom is not downloaded again

Special notes for your reviewer

N/a

@jpmcb jpmcb requested a review from a team as a code owner October 21, 2021 17:41
@jpmcb jpmcb force-pushed the standalone-overhaul branch from 49e31d1 to 8325323 Compare October 21, 2021 17:43
@jpmcb jpmcb changed the title Use io.Copy instead of os.Rename for bom downloading Use io.Copy instead of os.Rename for bom downloading in local plugin Oct 21, 2021
@joshrosso joshrosso merged commit da19b33 into vmware-tanzu:standalone-overhaul Oct 21, 2021
joshrosso pushed a commit that referenced this pull request Jan 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants