Skip to content

Commit

Permalink
fix: fix package.json loading
Browse files Browse the repository at this point in the history
  • Loading branch information
manast committed Jul 6, 2024
1 parent ef2f74b commit 9998df3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
5 changes: 1 addition & 4 deletions lib/cmd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,7 @@ import { versionChecker } from "./version-checker";
export const run = () => {

// Read the content of package.json
const packageJsonContent = readFileSync("./package.json", "utf8");

// Parse the JSON data
const { name, version } = JSON.parse(packageJsonContent);
const { name, version } = require(__dirname + "/../package.json") as { name: string, version: string }

console.info(
blueBright(
Expand Down
1 change: 0 additions & 1 deletion lib/version-checker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,5 @@ export const versionChecker = async (name: string, version: string) => {
),
err
);
process.exit(1);
}
};

0 comments on commit 9998df3

Please sign in to comment.