Skip to content

Commit 8e281cd

Browse files
committed
fix duplicate declaration error
1 parent f4cccca commit 8e281cd

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

src/ec2/activation.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,12 @@ export async function activate(ctx: ExtContext): Promise<void> {
2424
})
2525
}),
2626

27-
Commands.register('aws.ec2.openRemoteConnection', async (node?: Ec2InstanceNode) => {
28-
const selection = node ? node.toSelection() : await promptUserForEc2Selection()
29-
const connectionManager = new Ec2ConnectionManager(selection.region)
30-
31-
await connectionManager.attemptToOpenRemoteConnection(selection)
32-
}),
33-
3427
Commands.register('aws.ec2.copyInstanceId', async (node: Ec2InstanceNode) => {
3528
await copyTextCommand(node, 'id')
3629
}),
3730

3831
Commands.register('aws.ec2.openRemoteConnection', async (node?: Ec2Node) => {
39-
await (node ? openRemoteConnection(node) : openRemoteConnection(node))
32+
await openRemoteConnection(node)
4033
})
4134
)
4235
}

src/ec2/commands.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ export async function openTerminal(node?: Ec2Node) {
1818

1919
export async function openRemoteConnection(node?: Ec2Node) {
2020
const selection = node instanceof Ec2InstanceNode ? node.toSelection() : await promptUserForEc2Selection()
21-
//const connectionManager = new Ec2ConnectionManager(selection.region)
22-
console.log(selection)
21+
const connectionManager = new Ec2ConnectionManager(selection.region)
22+
await connectionManager.attemptToOpenRemoteConnection(selection)
2323
}
2424

2525
export async function copyInstanceId(instanceId: string): Promise<void> {

0 commit comments

Comments
 (0)