Skip to content

Commit

Permalink
Correctly reading version
Browse files Browse the repository at this point in the history
  • Loading branch information
ServerlessLife committed Apr 21, 2024
1 parent 69ae4b3 commit a17138a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/lldebugger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,10 @@ async function run() {
}

export async function getVersion() {
const packageJson = await fs.promises.readFile("./package.json", "utf-8");
const packageJson = await fs.promises.readFile(
path.join(moduleDirname(), "../", "package.json"),
"utf-8"
);
const { version } = JSON.parse(packageJson);
return version;
}
Expand Down

0 comments on commit a17138a

Please sign in to comment.