Skip to content

Commit

Permalink
use getProjectYear
Browse files Browse the repository at this point in the history
  • Loading branch information
rzblue committed Dec 17, 2024
1 parent 38fb367 commit 7ac726e
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions vscode-wpilib/src/dependencyView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -456,12 +456,17 @@ export class DependencyViewProvider implements vscode.WebviewViewProvider {

public async getAvailableDependencies(): Promise<IJsonList[]> {
this.homeDeps = [];
const listURL = this.vendordepMarketplaceURL + `2025beta.json`;
try {
this.onlineDeps = await this.loadFileFromUrl(listURL);
} catch (err) {
logger.log('Error fetching file', err);
if(this.wp === undefined) {
this.onlineDeps = [];
} else {
const projectYear = this.externalApi.getPreferencesAPI().getPreferences(this.wp).getProjectYear();
const listURL = this.vendordepMarketplaceURL + `${projectYear}.json`;
try {
this.onlineDeps = await this.loadFileFromUrl(listURL);
} catch (err) {
logger.log('Error fetching vendordep marketplace manifest', listURL, err);
this.onlineDeps = [];
}
}
this.homeDeps = await this.vendorLibraries.getHomeDirDeps();
this.homeDeps.forEach((homedep) => {
Expand Down

0 comments on commit 7ac726e

Please sign in to comment.