Skip to content
This repository has been archived by the owner on Feb 15, 2022. It is now read-only.

Fixed permission denied regression #257

Merged
merged 1 commit into from
Sep 9, 2019
Merged

Fixed permission denied regression #257

merged 1 commit into from
Sep 9, 2019

Conversation

evanlouie
Copy link
Contributor

  • Fixed an error which would occur if a user attempted to install a component which already previously been installed. This was caused do to being unable to overwrite existing files in the installed components .git directory. The previously installed component is now deleted prior to copying from the clone cache.
  • General cleanup

fixes #228

Fixed an error which would occur if a user attempted to `install` a
component which already previously been installed. This was caused do to
being unable to overwrite existing files in the installed components
`.git` directory. The previously installed component is now deleted
prior to copying from the clone cache.
@evanlouie evanlouie requested a review from timfpark September 9, 2019 08:17
// Clone and get the location of where it was cloned to in tmp
result := <-cache.cloneRepo(repo, commit, branch)
clonePath := result.get()
if result.Error != nil {
return result.Error
}

// Remove the into directory if it already exists
if err = os.RemoveAll(intoPath); err != nil {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important part

@@ -315,6 +315,11 @@ func (hd *helmDownloader) downloadChart(repo, chart, version, into string) (err
}
hd.mu.Unlock()

// Remove the into directory if it already exists
if err = os.RemoveAll(into); err != nil {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important part

Copy link
Contributor

@timfpark timfpark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great.

@evanlouie evanlouie merged commit b5f6d76 into master Sep 9, 2019
@evanlouie evanlouie deleted the fix-issue-228 branch September 9, 2019 18:16
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"permission denied" regression on helm_repo path during fab install with 0.15.1
2 participants