logshield-cli 0.2.6 → 0.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/index.cjs +2 -1
- package/package.json +1 -1
package/dist/cli/index.cjs
CHANGED
|
@@ -358,7 +358,8 @@ function hasFlag(flag) {
|
|
|
358
358
|
}
|
|
359
359
|
function getVersion() {
|
|
360
360
|
try {
|
|
361
|
-
const
|
|
361
|
+
const cliPath = process.argv[1];
|
|
362
|
+
const pkgPath = import_path.default.resolve(cliPath, "../../../package.json");
|
|
362
363
|
const pkg = JSON.parse(import_fs.default.readFileSync(pkgPath, "utf8"));
|
|
363
364
|
return pkg.version;
|
|
364
365
|
} catch {
|