Skip to content

Commit 39da0f5

Browse files
Pass node to picked create command (#306)
1 parent ec78c80 commit 39da0f5

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "vscode-azureresourcegroups",
33
"displayName": "Azure Resources",
44
"description": "%azureResourceGroups.description%",
5-
"version": "0.5.3",
5+
"version": "0.5.4-alpha.0",
66
"publisher": "ms-azuretools",
77
"icon": "resources/resourceGroup.png",
88
"aiKey": "AIF-d9b70cd4-b9f9-4d70-929b-a071c400b217",

src/commands/createResource.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ interface AzExtCreateResourceCommand extends Command {
1414
detail?: string;
1515
}
1616

17-
export async function createResource(context: IActionContext, _node?: SubscriptionTreeItem): Promise<void> {
17+
export async function createResource(context: IActionContext, node?: SubscriptionTreeItem): Promise<void> {
1818
const all = extensions.all;
1919

2020
const extCommands = all.map((azExt) => azExt.packageJSON?.contributes?.[contributesKey]?.commands as unknown).filter((value) => value !== undefined);
@@ -25,6 +25,6 @@ export async function createResource(context: IActionContext, _node?: Subscripti
2525
const pick = await context.ui.showQuickPick(createCommands.sort((a, b) => a.title.localeCompare(b.title)).map((command: AzExtCreateResourceCommand): IAzureQuickPickItem<AzExtCreateResourceCommand> => ({ label: command.title, data: command, detail: command.detail })), { placeHolder: 'Select a resource to create' });
2626

2727
if (pick) {
28-
await commands.executeCommand(pick.data.command);
28+
await commands.executeCommand(pick.data.command, node);
2929
}
3030
}

0 commit comments

Comments
 (0)