diff --git a/lib/cmd.ts b/lib/cmd.ts index 0c7e1d5..eaee94b 100644 --- a/lib/cmd.ts +++ b/lib/cmd.ts @@ -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( diff --git a/lib/version-checker.ts b/lib/version-checker.ts index 2640a23..35a1b9c 100644 --- a/lib/version-checker.ts +++ b/lib/version-checker.ts @@ -29,6 +29,5 @@ export const versionChecker = async (name: string, version: string) => { ), err ); - process.exit(1); } };