mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-03-22 04:40:30 -04:00
Enable no-floating-promises for azurecore (#16946)
* Enable no-floating-promises for azurecore * few more * fix compile
This commit is contained in:
@@ -22,8 +22,8 @@ export class AzureResourceCacheService implements IAzureResourceCacheService {
|
||||
return this._context.workspaceState.get(key);
|
||||
}
|
||||
|
||||
public update<T>(key: string, value: T): void {
|
||||
this._context.workspaceState.update(key, value);
|
||||
public async update<T>(key: string, value: T): Promise<void> {
|
||||
await this._context.workspaceState.update(key, value);
|
||||
}
|
||||
|
||||
private _context: ExtensionContext = undefined;
|
||||
|
||||
@@ -45,7 +45,7 @@ export class AzureResourceSubscriptionFilterService implements IAzureResourceSub
|
||||
|
||||
selectedSubscriptionsCache[account.key.accountId] = selectedSubscriptions;
|
||||
|
||||
this._cacheService.update<AzureResourceSelectedSubscriptionsCache>(this._cacheKey, { selectedSubscriptions: selectedSubscriptionsCache });
|
||||
await this._cacheService.update<AzureResourceSelectedSubscriptionsCache>(this._cacheKey, { selectedSubscriptions: selectedSubscriptionsCache });
|
||||
|
||||
const filters: string[] = [];
|
||||
for (const accountId in selectedSubscriptionsCache) {
|
||||
|
||||
@@ -47,7 +47,7 @@ export class AzureResourceSubscriptionService implements IAzureResourceSubscript
|
||||
const errorMsg = localize('azure.resource.tenantSubscriptionsError', "Failed to get subscriptions for account {0} (tenant '{1}'). {2}", account.key.accountId, tenantId, AzureResourceErrorMessageUtil.getErrorMessage(error));
|
||||
console.warn(errorMsg);
|
||||
errors.push(error);
|
||||
vscode.window.showWarningMessage(errorMsg);
|
||||
void vscode.window.showWarningMessage(errorMsg);
|
||||
}
|
||||
}
|
||||
if (!gotSubscriptions) {
|
||||
|
||||
@@ -37,7 +37,7 @@ const handleNeverUsed = async (): Promise<void> => {
|
||||
const option = await vscode.window.showInformationMessage<TerminalMessageItem>(neverUsedString, openAzureShellButton, okButton);
|
||||
|
||||
if (option.action === TerminalOption.OPEN_SITE) {
|
||||
vscode.env.openExternal(vscode.Uri.parse('https://aka.ms/AA83f8f'));
|
||||
void vscode.env.openExternal(vscode.Uri.parse('https://aka.ms/AA83f8f'));
|
||||
}
|
||||
};
|
||||
|
||||
@@ -115,7 +115,7 @@ export class AzureTerminalService implements IAzureTerminalService {
|
||||
});
|
||||
|
||||
if (!shell) {
|
||||
vscode.window.showErrorMessage(localize('azure.shellTypeRequired', "You must pick a shell type"));
|
||||
void vscode.window.showErrorMessage(localize('azure.shellTypeRequired', "You must pick a shell type"));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -236,7 +236,7 @@ class AzureTerminal implements vscode.Pseudoterminal {
|
||||
const terminalUri = terminalResult.data?.socketUri;
|
||||
|
||||
if (terminalResult.data.error) {
|
||||
vscode.window.showErrorMessage(terminalResult.data.error.message);
|
||||
void vscode.window.showErrorMessage(terminalResult.data.error.message);
|
||||
}
|
||||
|
||||
if (!terminalUri) {
|
||||
|
||||
Reference in New Issue
Block a user