Skip to content

Commit 4931fa4

Browse files
authored
Throw NoResourceFoundError (#354)
1 parent 9abcdbc commit 4931fa4

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

package-lock.json

Lines changed: 7 additions & 7 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
@@ -567,7 +567,7 @@
567567
"@azure/arm-resources": "5.0.0",
568568
"@azure/arm-resources-profile-2020-09-01-hybrid": "^2.0.0",
569569
"@microsoft/vscode-azext-azureutils": "^0.3.4",
570-
"@microsoft/vscode-azext-utils": "^0.3.8",
570+
"@microsoft/vscode-azext-utils": "^0.3.12",
571571
"fs-extra": "^8.1.0",
572572
"jsonc-parser": "^2.2.1",
573573
"open": "^8.0.4",

src/tree/SubscriptionTreeItem.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,10 @@ export class SubscriptionTreeItem extends SubscriptionTreeItemBase {
6767
.sort((a, b) => a.label.localeCompare(b.label))
6868
.sort((a, b) => a.group.localeCompare(b.group));
6969

70+
if (picks.length === 0) {
71+
throw new NoResourceFoundError();
72+
}
73+
7074
const quickPickOptions: IAzureQuickPickOptions = {
7175
enableGrouping: !options?.filter,
7276
placeHolder: localize('selectResource', 'Select a resource'),

0 commit comments

Comments
 (0)