Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
H
helm3
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
helm3
Commits
165818e3
Unverified
Commit
165818e3
authored
Aug 31, 2017
by
Adam Reese
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix(helm): Fix the bug of dependency update deleting subcharts
parent
1a4f5c3b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
manager.go
pkg/downloader/manager.go
+17
-0
No files found.
pkg/downloader/manager.go
View file @
165818e3
...
...
@@ -264,6 +264,9 @@ func (m *Manager) downloadAll(deps []*chartutil.Dependency) error {
return
err
}
}
if
err
:=
move
(
tmpPath
,
destPath
);
err
!=
nil
{
return
err
}
if
err
:=
os
.
RemoveAll
(
tmpPath
);
err
!=
nil
{
return
fmt
.
Errorf
(
"Failed to remove %v: %v"
,
tmpPath
,
err
)
}
...
...
@@ -610,3 +613,17 @@ func tarFromLocalDir(chartpath string, name string, repo string, version string)
return
""
,
fmt
.
Errorf
(
"can't get a valid version for dependency %s"
,
name
)
}
// move files from tmppath to destpath
func
move
(
tmpPath
,
destPath
string
)
error
{
files
,
_
:=
ioutil
.
ReadDir
(
tmpPath
)
for
_
,
file
:=
range
files
{
filename
:=
file
.
Name
()
tmpfile
:=
filepath
.
Join
(
tmpPath
,
filename
)
destfile
:=
filepath
.
Join
(
destPath
,
filename
)
if
err
:=
os
.
Rename
(
tmpfile
,
destfile
);
err
!=
nil
{
return
fmt
.
Errorf
(
"Unable to move local charts to charts dir: %v"
,
err
)
}
}
return
nil
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment