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.
@@ -358,7 +358,8 @@ function hasFlag(flag) {
358
358
  }
359
359
  function getVersion() {
360
360
  try {
361
- const pkgPath = import_path.default.resolve(__dirname, "../../package.json");
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 {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "logshield-cli",
3
- "version": "0.2.6",
3
+ "version": "0.2.7",
4
4
  "type": "commonjs",
5
5
  "bin": {
6
6
  "logshield": "dist/cli/index.cjs"