mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Improved behavior for accepting EULA. (#12453)
* working version of overloading "select" button * promptForEula to use showErrorMessage * make parameter optional in promptForEula * remove test code * PR feedback * eula to EULA * minor fix
This commit is contained in:
@@ -45,7 +45,7 @@ export class AzdataTool extends ToolBase {
|
||||
return 'https://docs.microsoft.com/sql/big-data-cluster/deploy-install-azdata';
|
||||
}
|
||||
|
||||
public validateEula(): boolean {
|
||||
public isEulaAccepted(): boolean {
|
||||
if (apiService.azdataApi.isEulaAccepted()) {
|
||||
return true;
|
||||
} else {
|
||||
@@ -54,6 +54,14 @@ export class AzdataTool extends ToolBase {
|
||||
}
|
||||
}
|
||||
|
||||
public async promptForEula(): Promise<boolean> {
|
||||
const eulaAccepted = await apiService.azdataApi.promptForEula();
|
||||
if (!eulaAccepted) {
|
||||
this.setStatusDescription(loc.azdataEulaDeclined);
|
||||
}
|
||||
return eulaAccepted;
|
||||
}
|
||||
|
||||
/* unused */
|
||||
protected get versionCommand(): Command {
|
||||
return {
|
||||
|
||||
@@ -58,7 +58,9 @@ export abstract class ToolBase implements ITool {
|
||||
|
||||
protected abstract readonly versionCommand: Command;
|
||||
|
||||
public validateEula(): boolean { return true; }
|
||||
public isEulaAccepted(): boolean { return true; }
|
||||
|
||||
public promptForEula(): Promise<boolean> { return Promise.resolve(true); }
|
||||
|
||||
public get dependencyMessages(): string[] {
|
||||
return (this.dependenciesByOsType.get(this.osDistribution) || []).map((msgType: dependencyType) => messageByDependencyType.get(msgType)!);
|
||||
|
||||
Reference in New Issue
Block a user