diff --git a/lib/args.js b/lib/args.js index 121638f..4cf3847 100644 --- a/lib/args.js +++ b/lib/args.js @@ -3,10 +3,9 @@ import help_default from './help.js' help_default() import { Command, Option, InvalidOptionArgumentError } from 'commander' import { readFileSync } from 'node:fs' -import * as path from 'node:path' import * as logger from './logger.js' import { config } from 'dotenv' -import { resolve, sep, posix } from 'path' +import { dirname, resolve, sep, posix } from 'node:path' import promptSync from 'prompt-sync' import { createPrivateKey } from 'crypto' @@ -15,7 +14,7 @@ const component = 'args' function getVersion() { try { - const packageJsonText = readFileSync(`${path.dirname(process?.pkg?.defaultEntrypoint ?? '.')}/package.json`, 'utf8') + const packageJsonText = readFileSync(`${dirname(process?.pkg?.defaultEntrypoint ?? '.')}/package.json`, 'utf8') return JSON.parse(packageJsonText).version } catch (error) {