Skip to content

Commit 1c87f1f

Browse files
authored
Use getProjectYear for vendordep marketplace (#736)
This results in using "2025beta" for the beta releases.
1 parent b9ceadd commit 1c87f1f

1 file changed

Lines changed: 10 additions & 5 deletions

File tree

vscode-wpilib/src/dependencyView.ts

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -456,12 +456,17 @@ export class DependencyViewProvider implements vscode.WebviewViewProvider {
456456

457457
public async getAvailableDependencies(): Promise<IJsonList[]> {
458458
this.homeDeps = [];
459-
const listURL = this.vendordepMarketplaceURL + `${this.externalApi.getUtilitiesAPI().getFrcYear()}.json`;
460-
try {
461-
this.onlineDeps = await this.loadFileFromUrl(listURL);
462-
} catch (err) {
463-
logger.log('Error fetching file', err);
459+
if(this.wp === undefined) {
464460
this.onlineDeps = [];
461+
} else {
462+
const projectYear = this.externalApi.getPreferencesAPI().getPreferences(this.wp).getProjectYear();
463+
const manifestURL = this.vendordepMarketplaceURL + `${projectYear}.json`;
464+
try {
465+
this.onlineDeps = await this.loadFileFromUrl(manifestURL);
466+
} catch (err) {
467+
logger.log('Error fetching vendordep marketplace manifest', manifestURL, err);
468+
this.onlineDeps = [];
469+
}
465470
}
466471
this.homeDeps = await this.vendorLibraries.getHomeDirDeps();
467472
this.homeDeps.forEach((homedep) => {

0 commit comments

Comments
 (0)