From 8e8632ddabdd70ab91c63b99936bed6eef27f510 Mon Sep 17 00:00:00 2001 From: cmbrose <5447118+cmbrose@users.noreply.github.com> Date: Fri, 3 Jun 2022 14:24:15 -0500 Subject: [PATCH] Prepend flag for scp support --- pkg/cmd/codespace/ssh.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/cmd/codespace/ssh.go b/pkg/cmd/codespace/ssh.go index 1dd601db5..12699e5c3 100644 --- a/pkg/cmd/codespace/ssh.go +++ b/pkg/cmd/codespace/ssh.go @@ -130,7 +130,8 @@ func (a *App) SSH(ctx context.Context, sshArgs []string, opts sshOptions) (err e } liveshareSSHOptions.UserPublicKeyFile = keyPair.PublicKeyPath - args = append(args, "-i", keyPair.PrivateKeyPath) + // For cp any flags need to come first, so prepend this one + args = append([]string{"-i", keyPair.PrivateKeyPath}, args...) } codespace, err := getOrChooseCodespace(ctx, a.apiClient, opts.codespace)