From 55fb846ac47b404247e484038cc7d612e4bcabdb Mon Sep 17 00:00:00 2001 From: Joe DeVivo Date: Tue, 6 Apr 2021 16:42:24 -0700 Subject: [PATCH] Relax boot_out.txt requirement --- src/librarymanager/libraryManager.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/librarymanager/libraryManager.ts b/src/librarymanager/libraryManager.ts index 004b47d..8146e6c 100644 --- a/src/librarymanager/libraryManager.ts +++ b/src/librarymanager/libraryManager.ts @@ -127,9 +127,11 @@ export class LibraryManager implements vscode.Disposable { this.workspaceLibraries = await this.loadLibraryMetadata(this.projectLibDir); this.cpVersion = this.getProjectCPVer(); - let v: string[] = this.cpVersion.split("."); - if(LibraryManager.BUNDLE_SUFFIXES.includes(`${v[0]}.x-mpy`)) { - this.mpySuffix = `${v[0]}.x-mpy`; + if(this.cpVersion){ + let v: string[] = this.cpVersion.split("."); + if(LibraryManager.BUNDLE_SUFFIXES.includes(`${v[0]}.x-mpy`)) { + this.mpySuffix = `${v[0]}.x-mpy`; + } } } @@ -210,6 +212,9 @@ export class LibraryManager implements vscode.Disposable { } } }); + if(!root) { + root = vscode.workspace.workspaceFolders[0].uri.fsPath; + } return root; } // Find it boot_out, so put boot_out.txt in your project root if you want this.