mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-29 17:23:25 -05:00
Fix deployment wizard to not close when cancelling out of password prompt (#14083)
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
import * as path from 'path';
|
||||
import { ErrorType, ErrorWithType } from 'resource-deployment';
|
||||
import { ToolsInstallPath } from '../constants';
|
||||
import { ITool, NoteBookEnvironmentVariablePrefix } from '../interfaces';
|
||||
|
||||
@@ -12,6 +13,10 @@ export function getErrorMessage(error: any): string {
|
||||
: typeof error === 'string' ? error : `${JSON.stringify(error, undefined, '\t')}`;
|
||||
}
|
||||
|
||||
export function isUserCancelledError(err: any): boolean {
|
||||
return err instanceof Error && 'type' in err && (<ErrorWithType>err).type === ErrorType.userCancelled;
|
||||
}
|
||||
|
||||
export function getDateTimeString(): string {
|
||||
return new Date().toISOString().slice(0, 19).replace(/[^0-9]/g, ''); // Take the date time information and only leaving the numbers
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user