mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-17 09:35:37 -05:00
Sql Binding: Add "Check out pane for more details" when nuget package download fails (#17680)
* check output for more details * detail error * wait for result from showerrormessage
This commit is contained in:
@@ -519,3 +519,4 @@ export function failedToParse(errorMessage: string) { return localize('failedToP
|
||||
export function jsonParseError(error: string, line: number, column: number) { return localize('jsonParseError', '{0} near line "{1}", column "{2}"', error, line, column); }
|
||||
export const moreInformation = localize('moreInformation', "More Information");
|
||||
export const addPackageReferenceMessage = localize('addPackageReferenceMessage', 'To use SQL bindings, ensure your Azure Functions project has a reference to {0}', sqlExtensionPackageName);
|
||||
export const addSqlBindingPackageError = localize('addSqlBindingPackageError', 'Error adding Sql Binding extension package to project');
|
||||
|
||||
@@ -11,9 +11,11 @@ import { ShellCommandOptions } from './shellExecutionHelper';
|
||||
|
||||
export class PackageHelper {
|
||||
private netCoreTool: NetCoreTool;
|
||||
private _outputChannel: vscode.OutputChannel;
|
||||
|
||||
constructor(outputChannel: vscode.OutputChannel) {
|
||||
this.netCoreTool = new NetCoreTool(outputChannel);
|
||||
this._outputChannel = outputChannel;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -72,7 +74,10 @@ export class PackageHelper {
|
||||
});
|
||||
}
|
||||
} catch (e) {
|
||||
void vscode.window.showErrorMessage(e.message);
|
||||
const result = await vscode.window.showErrorMessage(constants.addSqlBindingPackageError, constants.checkoutOutputMessage);
|
||||
if (result === constants.checkoutOutputMessage) {
|
||||
this._outputChannel.show();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user