From 1119b30a6a1d1b93bb8961300d4b6315ee1ade3d Mon Sep 17 00:00:00 2001 From: csmig <33138761+csmig@users.noreply.github.com> Date: Wed, 27 Mar 2024 17:12:39 +0000 Subject: [PATCH] fix: static version string in args.js (#111) --- lib/args.js | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/lib/args.js b/lib/args.js index 6ea8d27..b645f1a 100644 --- a/lib/args.js +++ b/lib/args.js @@ -1,3 +1,4 @@ +const version = '1.4.2' import help_default from './help.js' help_default() @@ -12,19 +13,8 @@ import { createPrivateKey } from 'crypto' const prompt = promptSync({ sigint:true }) const component = 'args' -function getVersion() { - try { - const packageJsonText = readFileSync('./package.json', 'utf8') - return JSON.parse(packageJsonText).version - } - catch (error) { - console.error('Error reading package.json:', error) - } -} - let configValid = true -const version = getVersion() // Use .env, if present, to setup the environment config()