Prepend flag for scp support

This commit is contained in:
cmbrose 2022-06-03 14:24:15 -05:00
parent 2209a84c9d
commit 8e8632ddab

View file

@ -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)