Alanren/extension install (#6918)

* fix extension install

* fix azure account open url issue
This commit is contained in:
Alan Ren
2019-08-23 14:50:08 -07:00
committed by GitHub
parent 7f32473a10
commit 9b7a7bd9dc
3 changed files with 11 additions and 7 deletions

View File

@@ -18,6 +18,8 @@ import { AccountProviderAddedEventParams, UpdateAccountListEventParams } from 's
import { IAccountManagementService } from 'sql/platform/accounts/common/interfaces';
import { Deferred } from 'sql/base/common/promise';
import { localize } from 'vs/nls';
import { IOpenerService } from 'vs/platform/opener/common/opener';
import { URI } from 'vs/base/common/uri';
export class AccountManagementService implements IAccountManagementService {
// CONSTANTS ///////////////////////////////////////////////////////////
@@ -46,7 +48,8 @@ export class AccountManagementService implements IAccountManagementService {
private _mementoObj: object,
@IInstantiationService private _instantiationService: IInstantiationService,
@IStorageService private _storageService: IStorageService,
@IClipboardService private _clipboardService: IClipboardService
@IClipboardService private _clipboardService: IClipboardService,
@IOpenerService private _openerService: IOpenerService
) {
// Create the account store
if (!this._mementoObj) {
@@ -310,7 +313,7 @@ export class AccountManagementService implements IAccountManagementService {
*/
public copyUserCodeAndOpenBrowser(userCode: string, uri: string): void {
this._clipboardService.writeText(userCode);
window.open(uri);
this._openerService.open(URI.parse(uri));
}
// SERVICE MANAGEMENT METHODS //////////////////////////////////////////

View File

@@ -567,7 +567,7 @@ function getTestState(): AccountManagementState {
let mockMemento = {};
// Create the account management service
let ams = new AccountManagementService(mockMemento, mockInstantiationService.object, new TestStorageService(), null);
let ams = new AccountManagementService(mockMemento, mockInstantiationService.object, new TestStorageService(), null, null);
// Wire up event handlers
let evUpdate = new EventVerifierSingle<UpdateAccountListEventParams>();