@package-pal/cli 0.0.36 → 0.0.38

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@package-pal/cli",
3
- "version": "0.0.36",
3
+ "version": "0.0.38",
4
4
  "description": "CLI tool exposing core PackagePal functionality.",
5
5
  "keywords": [
6
6
  "package",
@@ -1,3 +1,4 @@
1
+ import packageJson from '../../../../package.json' with { type: 'json' };
1
2
  import { exec } from './exec.js';
2
3
 
3
4
  /**
@@ -14,7 +15,9 @@ export const validateBinaryVersion = (targetVersion, targetBinPath) => {
14
15
  ).toString()
15
16
  .trim();
16
17
 
17
- if (stdout.toLowerCase() !== targetVersion.toLowerCase()) {
18
- throw new Error(`'${targetBinPath}' binary version mismatch; expected ${targetVersion}, got ${stdout}.`);
18
+ const expectedVersion = `${packageJson.version}-${targetVersion}`;
19
+
20
+ if (stdout.toLowerCase() !== expectedVersion.toLowerCase()) {
21
+ throw new Error(`'${targetBinPath}' binary version mismatch; expected ${expectedVersion}, got ${stdout}.`);
19
22
  }
20
23
  };