|
|
@ -39,6 +39,7 @@ var errNoRepositories = errors.New("no repositories found. You must add one befo
|
|
|
|
type repoUpdateOptions struct {
|
|
|
|
type repoUpdateOptions struct {
|
|
|
|
update func([]*repo.ChartRepository, io.Writer)
|
|
|
|
update func([]*repo.ChartRepository, io.Writer)
|
|
|
|
repoFile string
|
|
|
|
repoFile string
|
|
|
|
|
|
|
|
repoCache string
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func newRepoUpdateCmd(out io.Writer) *cobra.Command {
|
|
|
|
func newRepoUpdateCmd(out io.Writer) *cobra.Command {
|
|
|
@ -52,6 +53,7 @@ func newRepoUpdateCmd(out io.Writer) *cobra.Command {
|
|
|
|
Args: require.NoArgs,
|
|
|
|
Args: require.NoArgs,
|
|
|
|
RunE: func(cmd *cobra.Command, args []string) error {
|
|
|
|
RunE: func(cmd *cobra.Command, args []string) error {
|
|
|
|
o.repoFile = settings.RepositoryConfig
|
|
|
|
o.repoFile = settings.RepositoryConfig
|
|
|
|
|
|
|
|
o.repoCache = settings.RepositoryCache
|
|
|
|
return o.run(out)
|
|
|
|
return o.run(out)
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -69,6 +71,9 @@ func (o *repoUpdateOptions) run(out io.Writer) error {
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if o.repoCache != "" {
|
|
|
|
|
|
|
|
r.CachePath = o.repoCache
|
|
|
|
|
|
|
|
}
|
|
|
|
repos = append(repos, r)
|
|
|
|
repos = append(repos, r)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|