mirror of https://github.com/helm/helm.git
fix(helm): load home from flags during runtime
This commit is contained in:
parent
0a20ed73be
commit
dd952e61f0
|
@ -62,9 +62,7 @@ type createCmd struct {
|
|||
}
|
||||
|
||||
func newCreateCmd(out io.Writer) *cobra.Command {
|
||||
cc := &createCmd{
|
||||
out: out,
|
||||
}
|
||||
cc := &createCmd{out: out}
|
||||
|
||||
cmd := &cobra.Command{
|
||||
Use: "create NAME",
|
||||
|
|
|
@ -108,9 +108,8 @@ type dependencyListCmd struct {
|
|||
}
|
||||
|
||||
func newDependencyListCmd(out io.Writer) *cobra.Command {
|
||||
dlc := &dependencyListCmd{
|
||||
out: out,
|
||||
}
|
||||
dlc := &dependencyListCmd{out: out}
|
||||
|
||||
cmd := &cobra.Command{
|
||||
Use: "list [flags] CHART",
|
||||
Aliases: []string{"ls"},
|
||||
|
|
|
@ -45,9 +45,7 @@ type dependencyBuildCmd struct {
|
|||
}
|
||||
|
||||
func newDependencyBuildCmd(out io.Writer) *cobra.Command {
|
||||
dbc := &dependencyBuildCmd{
|
||||
out: out,
|
||||
}
|
||||
dbc := &dependencyBuildCmd{out: out}
|
||||
|
||||
cmd := &cobra.Command{
|
||||
Use: "build [flags] CHART",
|
||||
|
|
|
@ -52,9 +52,7 @@ type dependencyUpdateCmd struct {
|
|||
|
||||
// newDependencyUpdateCmd creates a new dependency update command.
|
||||
func newDependencyUpdateCmd(out io.Writer) *cobra.Command {
|
||||
duc := &dependencyUpdateCmd{
|
||||
out: out,
|
||||
}
|
||||
duc := &dependencyUpdateCmd{out: out}
|
||||
|
||||
cmd := &cobra.Command{
|
||||
Use: "update [flags] CHART",
|
||||
|
|
|
@ -82,9 +82,7 @@ type initCmd struct {
|
|||
}
|
||||
|
||||
func newInitCmd(out io.Writer) *cobra.Command {
|
||||
i := &initCmd{
|
||||
out: out,
|
||||
}
|
||||
i := &initCmd{out: out}
|
||||
|
||||
cmd := &cobra.Command{
|
||||
Use: "init",
|
||||
|
|
|
@ -64,9 +64,7 @@ type packageCmd struct {
|
|||
}
|
||||
|
||||
func newPackageCmd(out io.Writer) *cobra.Command {
|
||||
pkg := &packageCmd{
|
||||
out: out,
|
||||
}
|
||||
pkg := &packageCmd{out: out}
|
||||
|
||||
cmd := &cobra.Command{
|
||||
Use: "package [flags] [CHART_PATH] [...]",
|
||||
|
|
|
@ -41,9 +41,7 @@ type repoAddCmd struct {
|
|||
}
|
||||
|
||||
func newRepoAddCmd(out io.Writer) *cobra.Command {
|
||||
add := &repoAddCmd{
|
||||
out: out,
|
||||
}
|
||||
add := &repoAddCmd{out: out}
|
||||
|
||||
cmd := &cobra.Command{
|
||||
Use: "add [flags] [NAME] [URL]",
|
||||
|
|
|
@ -45,9 +45,7 @@ type repoIndexCmd struct {
|
|||
}
|
||||
|
||||
func newRepoIndexCmd(out io.Writer) *cobra.Command {
|
||||
index := &repoIndexCmd{
|
||||
out: out,
|
||||
}
|
||||
index := &repoIndexCmd{out: out}
|
||||
|
||||
cmd := &cobra.Command{
|
||||
Use: "index [flags] [DIR]",
|
||||
|
|
|
@ -34,9 +34,7 @@ type repoListCmd struct {
|
|||
}
|
||||
|
||||
func newRepoListCmd(out io.Writer) *cobra.Command {
|
||||
list := &repoListCmd{
|
||||
out: out,
|
||||
}
|
||||
list := &repoListCmd{out: out}
|
||||
|
||||
cmd := &cobra.Command{
|
||||
Use: "list [flags]",
|
||||
|
|
|
@ -34,9 +34,7 @@ type repoRemoveCmd struct {
|
|||
}
|
||||
|
||||
func newRepoRemoveCmd(out io.Writer) *cobra.Command {
|
||||
remove := &repoRemoveCmd{
|
||||
out: out,
|
||||
}
|
||||
remove := &repoRemoveCmd{out: out}
|
||||
|
||||
cmd := &cobra.Command{
|
||||
Use: "remove [flags] [NAME]",
|
||||
|
|
|
@ -37,9 +37,7 @@ Information is cached locally, where it is used by commands like 'helm search'.
|
|||
future releases.
|
||||
`
|
||||
|
||||
var (
|
||||
errNoRepositories = errors.New("no repositories found. You must add one before updating")
|
||||
)
|
||||
var errNoRepositories = errors.New("no repositories found. You must add one before updating")
|
||||
|
||||
type repoUpdateCmd struct {
|
||||
update func([]*repo.ChartRepository, io.Writer, helmpath.Home)
|
||||
|
|
|
@ -50,13 +50,14 @@ type searchCmd struct {
|
|||
}
|
||||
|
||||
func newSearchCmd(out io.Writer) *cobra.Command {
|
||||
sc := &searchCmd{out: out, helmhome: settings.Home}
|
||||
sc := &searchCmd{out: out}
|
||||
|
||||
cmd := &cobra.Command{
|
||||
Use: "search [keyword]",
|
||||
Short: "search for a keyword in charts",
|
||||
Long: searchDesc,
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
sc.helmhome = settings.Home
|
||||
return sc.run(args)
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue