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

Check that chart exists when updating its deps #1606

Merged
merged 1 commit into from
Dec 17, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions integrations/helm/chartsync/deps.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,15 @@ import (
func updateDependencies(chartDir, helmhome string) error {
var hasLockFile bool

// sanity check: does the chart directory exist
chartInfo, err := os.Stat(chartDir)
switch {
case err != nil:
return err
case !chartInfo.IsDir():
return fmt.Errorf("chart path %s is not a directory", chartDir)
}

// check if the requirements file exists
reqFilePath := filepath.Join(chartDir, "requirements.yaml")
reqInfo, err := os.Stat(reqFilePath)
Expand Down