From c6b3e2e1c834a8e19681a046068c9416fe2f6295 Mon Sep 17 00:00:00 2001 From: Ryan Luker Date: Mon, 17 Jul 2017 19:39:10 -0700 Subject: [PATCH] try using uri.file instead of parse for preview lcov report (#81) --- src/gutters.ts | 2 +- src/lcov.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gutters.ts b/src/gutters.ts index 62ec756..76df876 100644 --- a/src/gutters.ts +++ b/src/gutters.ts @@ -62,7 +62,7 @@ export class Gutters { } if (!pickedReport) { throw new Error("Could not show Lcov Report file!"); } - const reportUri = Uri.parse(`file:///${pickedReport}`); + const reportUri = Uri.file(pickedReport.toString()); await commands.executeCommand( "vscode.previewHtml", reportUri, diff --git a/src/lcov.ts b/src/lcov.ts index 2d7ed77..5e169ee 100644 --- a/src/lcov.ts +++ b/src/lcov.ts @@ -36,7 +36,7 @@ export class Lcov { public findReports(): Promise { return new Promise((resolve, reject) => { this.glob.find( - `**/coverage/**/*.html`, + `**/coverage/**/index.html`, { ignore: "**/node_modules/**", cwd: this.vscode.getRootPath(), realpath: true }, (err, files) => { if (!files || !files.length) { return reject("Could not find a Lcov Report file!"); }