Fix download manually link (#16787)

* Fix download manually link

* Fix compile
This commit is contained in:
Charles Gagnon
2021-08-16 12:45:19 -07:00
committed by GitHub
parent f5f52b19c7
commit 455b3478c1

View File

@@ -101,7 +101,7 @@ export class PromptExtensionInstallFailureAction extends Action {
constructor( constructor(
private readonly extension: IExtension, private readonly extension: IExtension,
private readonly version: string, public readonly version: string, // {{SQL CARBON EDIT}} Making public to get around compile error since we don't use this anymore (easier than updating all constructor calls)
private readonly installOperation: InstallOperation, private readonly installOperation: InstallOperation,
private readonly error: Error, private readonly error: Error,
@IProductService private readonly productService: IProductService, @IProductService private readonly productService: IProductService,
@@ -141,7 +141,7 @@ export class PromptExtensionInstallFailureAction extends Action {
if (this.extension.gallery && this.productService.extensionsGallery) { if (this.extension.gallery && this.productService.extensionsGallery) {
promptChoices.push({ promptChoices.push({
label: localize('download', "Try Downloading Manually..."), label: localize('download', "Try Downloading Manually..."),
run: () => this.openerService.open(URI.parse(`${this.productService.extensionsGallery!.serviceUrl}/publishers/${this.extension.publisher}/vsextensions/${this.extension.name}/${this.version}/vspackage`)).then(() => { run: () => this.openerService.open(URI.parse(this.extension.gallery.assets.download?.uri ?? this.extension.gallery.assets.downloadPage.uri)).then(() => { // {{SQL CARBON EDIT}} Use links from the assets since we don't have the same marketplace
this.notificationService.prompt( this.notificationService.prompt(
Severity.Info, Severity.Info,
localize('install vsix', 'Once downloaded, please manually install the downloaded VSIX of \'{0}\'.', this.extension.identifier.id), localize('install vsix', 'Once downloaded, please manually install the downloaded VSIX of \'{0}\'.', this.extension.identifier.id),