Skip to content

Commit

Permalink
Update to handle non Adafruit supplied libraries (#122)
Browse files Browse the repository at this point in the history
Co-authored-by: Chris Ward <chris.ward@improving.com>
  • Loading branch information
veggie2u and Chris Ward committed Dec 30, 2023
1 parent 86a84f8 commit a673c1b
Showing 1 changed file with 20 additions and 10 deletions.
30 changes: 20 additions & 10 deletions src/librarymanager/libraryManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,27 @@ class LibraryQP implements vscode.QuickPickItem {
public constructor(b: Library, p: Library) {
this.bundleLib = b;
this.projectLib = p;
this.label = b.name;

if(p === null) {
this.op = "install";
this.description = `Install version ${b.version}`;
} else if(b.version !== p.version) {
this.op = "update";
this.description = `Update from v${p.version} to v${b.version}`;
if(b === undefined) {
this.op = "custom";
if(p === null) {
this.label = "Custom";
this.description = "Cannot update";
} else {
this.label = p.name;
this.description = `v${p.version} is a custom library. Not updateable`;
}
} else {
this.op = null;
this.description = `v${p.version} is installed and up to date.`;
this.label = b.name;
if(p === null) {
this.op = "install";
this.description = `Install version ${b.version}`;
} else if(b.version !== p.version) {
this.op = "update";
this.description = `Update from v${p.version} to v${b.version}`;
} else {
this.op = null;
this.description = `v${p.version} is installed and up to date.`;
}
}
}

Expand Down

0 comments on commit a673c1b

Please sign in to comment.