Skip to content

Commit badaa0c

Browse files
Elimate duplicate login call in cf7 logs command
[#169746459] Co-authored-by: Weyman Fung <[email protected]> Co-authored-by: Merric de Launey <[email protected]>
1 parent e462162 commit badaa0c

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

command/v7/logs_command.go

+1-7
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import (
1010
"code.cloudfoundry.org/cli/api/cloudcontroller/ccv3"
1111
"code.cloudfoundry.org/cli/command"
1212
"code.cloudfoundry.org/cli/command/flag"
13-
"code.cloudfoundry.org/cli/command/v7/shared"
1413
)
1514

1615
type LogsCommand struct {
@@ -31,12 +30,7 @@ func (cmd *LogsCommand) Setup(config command.Config, ui command.UI) error {
3130
return err
3231
}
3332

34-
ccClient, _, err := shared.GetNewClientsAndConnectToCF(config, ui, "")
35-
if err != nil {
36-
return err
37-
}
38-
39-
cmd.LogCacheClient = command.NewLogCacheClient(ccClient.Info.LogCache(), config, ui)
33+
cmd.LogCacheClient = command.NewLogCacheClient(cmd.cloudControllerClient.Info.LogCache(), config, ui)
4034
return nil
4135
}
4236

0 commit comments

Comments
 (0)