Skip to content

Commit

Permalink
fix: Debug flag should apply to single invocation only
Browse files Browse the repository at this point in the history
This fixes a regression bug, where the `--debug` carries over to other
invocations of the `porter upgrade` command.

Signed-off-by: Kim Christensen <kimworking@gmail.com>
  • Loading branch information
kichristensen committed Nov 1, 2024
1 parent 9ece995 commit 9b604ac
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions pkg/porter/parameters.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"fmt"
"path/filepath"
"sort"
"strconv"
"strings"
"time"

Expand Down Expand Up @@ -840,10 +841,7 @@ func (p *Porter) applyActionOptionsToInstallation(ctx context.Context, ba Bundle
return err
}

// Default the porter-debug param to --debug
if o.DebugMode {
parsedOverrides["porter-debug"] = "true"
}
parsedOverrides["porter-debug"] = strconv.FormatBool(o.DebugMode)

// Apply overrides on to of any pre-existing parameters that were specified previously
if len(parsedOverrides) > 0 {
Expand Down

0 comments on commit 9b604ac

Please sign in to comment.