MCPcopy
hub / github.com/helm/helm / newDependencyUpdateCmd

Function newDependencyUpdateCmd

pkg/cmd/dependency_update.go:47–90  ·  view source on GitHub ↗

newDependencyUpdateCmd creates a new dependency update command.

(_ *action.Configuration, out io.Writer)

Source from the content-addressed store, hash-verified

45
46// newDependencyUpdateCmd creates a new dependency update command.
47func newDependencyUpdateCmd(_ *action.Configuration, out io.Writer) *cobra.Command {
48 client := action.NewDependency()
49
50 cmd := &cobra.Command{
51 Use: "update CHART",
52 Aliases: []string{"up"},
53 Short: "update charts/ based on the contents of Chart.yaml",
54 Long: dependencyUpDesc,
55 Args: require.MaximumNArgs(1),
56 RunE: func(_ *cobra.Command, args []string) error {
57 chartpath := "."
58 if len(args) > 0 {
59 chartpath = filepath.Clean(args[0])
60 }
61 registryClient, err := newRegistryClient(out, client.CertFile, client.KeyFile, client.CaFile,
62 client.InsecureSkipTLSVerify, client.PlainHTTP, client.Username, client.Password)
63 if err != nil {
64 return fmt.Errorf("missing registry client: %w", err)
65 }
66
67 man := &downloader.Manager{
68 Out: out,
69 ChartPath: chartpath,
70 Keyring: client.Keyring,
71 SkipUpdate: client.SkipRefresh,
72 Getters: getter.All(settings),
73 RegistryClient: registryClient,
74 RepositoryConfig: settings.RepositoryConfig,
75 RepositoryCache: settings.RepositoryCache,
76 ContentCache: settings.ContentCache,
77 Debug: settings.Debug,
78 }
79 if client.Verify {
80 man.Verify = downloader.VerifyAlways
81 }
82 return man.Update()
83 },
84 }
85
86 f := cmd.Flags()
87 addDependencySubcommandFlags(f, client)
88
89 return cmd
90}

Callers 1

newDependencyCmdFunction · 0.85

Calls 6

UpdateMethod · 0.95
NewDependencyFunction · 0.92
MaximumNArgsFunction · 0.92
AllFunction · 0.92
newRegistryClientFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…