|
|
|
@ -17,11 +17,12 @@ limitations under the License.
|
|
|
|
|
package main
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"errors"
|
|
|
|
|
"fmt"
|
|
|
|
|
"io"
|
|
|
|
|
"sync"
|
|
|
|
|
|
|
|
|
|
"github.com/pkg/errors"
|
|
|
|
|
githubErrors "github.com/pkg/errors"
|
|
|
|
|
"github.com/spf13/cobra"
|
|
|
|
|
|
|
|
|
|
"helm.sh/helm/v3/cmd/helm/require"
|
|
|
|
@ -83,7 +84,7 @@ func (o *repoUpdateOptions) run(out io.Writer) error {
|
|
|
|
|
case isNotExist(err):
|
|
|
|
|
return errNoRepositories
|
|
|
|
|
case err != nil:
|
|
|
|
|
return errors.Wrapf(err, "failed loading file: %s", o.repoFile)
|
|
|
|
|
return githubErrors.Wrapf(err, "failed loading file: %s", o.repoFile)
|
|
|
|
|
case len(f.Repositories) == 0:
|
|
|
|
|
return errNoRepositories
|
|
|
|
|
}
|
|
|
|
@ -133,7 +134,7 @@ func updateCharts(repos []*repo.ChartRepository, out io.Writer, failOnRepoUpdate
|
|
|
|
|
wg.Wait()
|
|
|
|
|
|
|
|
|
|
if len(repoFailList) > 0 && failOnRepoUpdateFail {
|
|
|
|
|
return fmt.Errorf("Failed to update the following repositories: %s",
|
|
|
|
|
return fmt.Errorf("failed to update the following repositories: %s",
|
|
|
|
|
repoFailList)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -151,7 +152,7 @@ func checkRequestedRepos(requestedRepos []string, validRepos []*repo.Entry) erro
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if !found {
|
|
|
|
|
return errors.Errorf("no repositories found matching '%s'. Nothing will be updated", requestedRepo)
|
|
|
|
|
return fmt.Errorf("no repositories found matching '%s'. Nothing will be updated", requestedRepo)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return nil
|
|
|
|
|