Skip to content

Commit 10f1b6f

Browse files
committed
nit: cleanup naming; add constant
1 parent b3b341d commit 10f1b6f

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

cmd/ssh.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ import (
1414
boshui "github.com/cloudfoundry/bosh-cli/v7/ui"
1515
)
1616

17+
const logTag = "ssh"
18+
1719
type SSHCmd struct {
1820
deployment boshdir.Deployment
1921
intSSHRunner boshssh.Runner
@@ -172,9 +174,9 @@ func (c EnvSSHCmd) Run(opts SSHOpts) error {
172174
}
173175

174176
defer func() {
175-
_, err1 := agentClient.CleanUpSSH(sshOpts.Username)
176-
if err1 != nil {
177-
c.logger.Warn("SSH", fmt.Sprintf("SSH cleanup failed for user %s. Artifacts may be left over on the VM: %v", sshOpts.Username, err1))
177+
_, cleanupErr := agentClient.CleanUpSSH(sshOpts.Username)
178+
if cleanupErr != nil {
179+
c.logger.Warn(logTag, fmt.Sprintf("SSH cleanup failed for user %s. Artifacts may be left over on the VM: %v", sshOpts.Username, cleanupErr))
178180
}
179181
}()
180182

0 commit comments

Comments
 (0)