|
|
@ -302,7 +302,7 @@ func (m *Manager) downloadAll(deps []*chart.Dependency) error {
|
|
|
|
if m.Debug {
|
|
|
|
if m.Debug {
|
|
|
|
fmt.Fprintf(m.Out, "Archiving %s from repo %s\n", dep.Name, dep.Repository)
|
|
|
|
fmt.Fprintf(m.Out, "Archiving %s from repo %s\n", dep.Name, dep.Repository)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
ver, err := tarFromLocalDir(m.ChartPath, dep.Name, dep.Repository, dep.Version)
|
|
|
|
ver, err := tarFromLocalDir(m.ChartPath, dep.Name, dep.Repository, dep.Version, tmpPath)
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
saveError = err
|
|
|
|
saveError = err
|
|
|
|
break
|
|
|
|
break
|
|
|
@ -852,10 +852,8 @@ func writeLock(chartpath string, lock *chart.Lock, legacyLockfile bool) error {
|
|
|
|
return ioutil.WriteFile(dest, data, 0644)
|
|
|
|
return ioutil.WriteFile(dest, data, 0644)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// archive a dep chart from local directory and save it into charts/
|
|
|
|
// archive a dep chart from local directory and save it into destPath
|
|
|
|
func tarFromLocalDir(chartpath, name, repo, version string) (string, error) {
|
|
|
|
func tarFromLocalDir(chartpath, name, repo, version, destPath string) (string, error) {
|
|
|
|
destPath := filepath.Join(chartpath, "charts")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if !strings.HasPrefix(repo, "file://") {
|
|
|
|
if !strings.HasPrefix(repo, "file://") {
|
|
|
|
return "", errors.Errorf("wrong format: chart %s repository %s", name, repo)
|
|
|
|
return "", errors.Errorf("wrong format: chart %s repository %s", name, repo)
|
|
|
|
}
|
|
|
|
}
|
|
|
|