Skip to content

Commit

Permalink
fix: Throw read file sync error instead of throwing static error mess…
Browse files Browse the repository at this point in the history
…ages (#69)
  • Loading branch information
KeisukeYamashita authored Feb 27, 2023
1 parent 3bc383f commit eab71d1
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,15 +103,7 @@ export async function run() {

console.log(`Using lcov file: ${pathToLcov}`);

let file;

try {
file = fs.readFileSync(pathToLcov, 'utf8');
} catch (err) {
throw new Error("Lcov file not found.");
}


const file = fs.readFileSync(pathToLcov, 'utf8');
const basePath = core.getInput('base-path');
const adjustedFile = basePath ? adjustLcovBasePath(file, basePath) : file;

Expand Down

0 comments on commit eab71d1

Please sign in to comment.