|
|
|
@ -87,6 +87,9 @@ By default, the default directories depend on the Operating System. The defaults
|
|
|
|
|
| Windows | %TEMP%\helm | %APPDATA%\helm | %APPDATA%\helm |
|
|
|
|
|
`
|
|
|
|
|
|
|
|
|
|
// CMDNeedRegistryClient Any new command need RegistryClient should be added to this list.
|
|
|
|
|
var CMDNeedRegistryClient = []string{"show", "template", "install", "upgrade", "pull", "registry", "dependency", "dep", "push", "package"}
|
|
|
|
|
|
|
|
|
|
func newRootCmd(actionConfig *action.Configuration, out io.Writer, args []string) (*cobra.Command, error) {
|
|
|
|
|
cmd := &cobra.Command{
|
|
|
|
|
Use: "helm",
|
|
|
|
@ -155,8 +158,14 @@ func newRootCmd(actionConfig *action.Configuration, out io.Writer, args []string
|
|
|
|
|
|
|
|
|
|
registryClient, err := newDefaultRegistryClient(false)
|
|
|
|
|
if err != nil {
|
|
|
|
|
// see issues #11009
|
|
|
|
|
debug("generate registry client failed: %v", err.Error())
|
|
|
|
|
for i := 0; len(args) > 0 && i < len(CMDNeedRegistryClient); i++ {
|
|
|
|
|
if CMDNeedRegistryClient[i] == args[0] {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
actionConfig.RegistryClient = registryClient
|
|
|
|
|
|
|
|
|
|
// Add subcommands
|
|
|
|
|