Skip to content

Commit

Permalink
Remove unnecessary Debug on legacy CLI wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
pjcdawkins committed Jan 15, 2025
1 parent 3e31285 commit 3d69452
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 7 deletions.
1 change: 0 additions & 1 deletion commands/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,6 @@ func makeLegacyCLIWrapper(cnf *config.Config, stdout, stderr io.Writer, stdin io
return &legacy.CLIWrapper{
Config: cnf,
Version: version,
Debug: viper.GetBool("debug"),
DebugLogFunc: debugLog,
DisableInteraction: viper.GetBool("no-interaction"),
Stdout: stdout,
Expand Down
4 changes: 0 additions & 4 deletions internal/legacy/legacy.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ type CLIWrapper struct {
Stdin io.Reader
Config *config.Config
Version string
Debug bool
DisableInteraction bool
DebugLogFunc func(string, ...any)

Expand Down Expand Up @@ -155,9 +154,6 @@ func (c *CLIWrapper) Exec(ctx context.Context, args ...string) error {
envPrefix+"WRAPPED=1",
envPrefix+"APPLICATION_VERSION="+c.Version,
)
if c.Debug {
cmd.Env = append(cmd.Env, envPrefix+"CLI_DEBUG=1")
}
if c.DisableInteraction {
cmd.Env = append(cmd.Env, envPrefix+"NO_INTERACTION=1")
}
Expand Down
2 changes: 0 additions & 2 deletions internal/legacy/legacy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,8 @@ func TestLegacyCLI(t *testing.T) {
wrapper := &CLIWrapper{
Stdout: stdout,
Stderr: stdErr,
Stdin: nil,
Config: cnf,
Version: "test",
Debug: false,
DisableInteraction: true,
}
if testing.Verbose() {
Expand Down

0 comments on commit 3d69452

Please sign in to comment.