mirror of
https://github.com/helmfile/helmfile.git
synced 2026-09-30 12:54:14 +02:00
+2
-2
@@ -342,7 +342,7 @@ func (a *App) Test(c TestConfigProvider) error {
|
||||
|
||||
func (a *App) PrintState(c StateConfigProvider) error {
|
||||
return a.VisitDesiredStatesWithReleasesFiltered(a.FileOrDir, func(st *state.HelmState) (errs []error) {
|
||||
err := NewRun(st, nil, NewContext()).withPreparedCharts(false, "build", func() {
|
||||
err := NewRun(st, a.getHelm(st), NewContext()).withPreparedCharts(false, "build", func() {
|
||||
state, err := st.ToYaml()
|
||||
if err != nil {
|
||||
errs = []error{err}
|
||||
@@ -365,7 +365,7 @@ func (a *App) ListReleases(c ListConfigProvider) error {
|
||||
var releases []*HelmRelease
|
||||
|
||||
err := a.VisitDesiredStatesWithReleasesFiltered(a.FileOrDir, func(st *state.HelmState) []error {
|
||||
err := NewRun(st, nil, NewContext()).withPreparedCharts(false, "list", func() {
|
||||
err := NewRun(st, a.getHelm(st), NewContext()).withPreparedCharts(false, "list", func() {
|
||||
|
||||
//var releases m
|
||||
for _, r := range st.Releases {
|
||||
|
||||
@@ -22,6 +22,10 @@ type Run struct {
|
||||
}
|
||||
|
||||
func NewRun(st *state.HelmState, helm helmexec.Interface, ctx Context) *Run {
|
||||
if helm == nil {
|
||||
panic("Assertion failed: helmexec.Interface must not be nil")
|
||||
}
|
||||
|
||||
return &Run{state: st, helm: helm, ctx: ctx}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user