From 400db0f41b275383c92f282e6480fc6fb92ac819 Mon Sep 17 00:00:00 2001 From: David Gardiner Date: Tue, 30 Jan 2024 13:24:23 -0800 Subject: [PATCH] Fix linting error --- pkg/cmd/codespace/ssh.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pkg/cmd/codespace/ssh.go b/pkg/cmd/codespace/ssh.go index 43e081103..571f74267 100644 --- a/pkg/cmd/codespace/ssh.go +++ b/pkg/cmd/codespace/ssh.go @@ -276,10 +276,9 @@ func (a *App) SSH(ctx context.Context, sshArgs []string, opts sshOptions) (err e shellClosed := make(chan error, 1) go func() { - var err error if opts.scpArgs != nil { // args is the correct variable to use here, we just use scpArgs as the check for which command to run - err = codespaces.Copy(ctx, args, localSSHServerPort, connectDestination) + shellClosed <- codespaces.Copy(ctx, args, localSSHServerPort, connectDestination) } else { // Parse the ssh args to determine if the user specified a command args, command, err := codespaces.ParseSSHArgs(args) @@ -295,11 +294,10 @@ func (a *App) SSH(ctx context.Context, sshArgs []string, opts sshOptions) (err e invoker.KeepAlive() } - err = codespaces.Shell( + shellClosed <- codespaces.Shell( ctx, a.errLogger, args, command, localSSHServerPort, connectDestination, opts.printConnDetails, ) } - shellClosed <- err }() select {