Return err when failed to check dependencie and save chart

pull/2429/head
fengyun.pan 8 years ago
parent 35aabdb61a
commit 15daced241

@ -130,6 +130,10 @@ func (p *packageCmd) run(cmd *cobra.Command, args []string) error {
if err := checkDependencies(ch, reqs, p.out); err != nil { if err := checkDependencies(ch, reqs, p.out); err != nil {
return err return err
} }
} else {
if err != chartutil.ErrRequirementsNotFound {
return err
}
} }
var dest string var dest string
@ -147,6 +151,8 @@ func (p *packageCmd) run(cmd *cobra.Command, args []string) error {
name, err := chartutil.Save(ch, dest) name, err := chartutil.Save(ch, dest)
if err == nil { if err == nil {
debug("Saved %s to current directory\n", name) debug("Saved %s to current directory\n", name)
} else {
return fmt.Errorf("Failed to save: %s", err)
} }
// Save to $HELM_HOME/local directory. This is second, because we don't want // Save to $HELM_HOME/local directory. This is second, because we don't want

Loading…
Cancel
Save