Skip to content

Commit

Permalink
fix: static version string in args.js (#111)
Browse files Browse the repository at this point in the history
  • Loading branch information
csmig authored Mar 27, 2024
1 parent e5755d3 commit 1119b30
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions lib/args.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const version = '1.4.2'

import help_default from './help.js'
help_default()
Expand All @@ -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()
Expand Down

0 comments on commit 1119b30

Please sign in to comment.