@timurproko/a1-install 0.2.1-dev.602 → 0.2.1-dev.603

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/bin/a1-install.js CHANGED
@@ -360,11 +360,13 @@ async function verifyLaunchers(globalRoot, platform) {
360
360
  const paths = launcherPaths(globalRoot, platform);
361
361
  const entry = resolve(packageRootFor(globalRoot), "bin", "cli.js");
362
362
  const expectedSuffix = `${APPLICATION_PACKAGE}/bin/cli.js`;
363
+ let canonicalEntry = null;
363
364
  for (const path of paths) {
364
365
  try {
365
366
  const metadata = await lstat(path);
366
367
  if (metadata.isSymbolicLink()) {
367
- if (normalizePath(await realpath(path), platform) !== normalizePath(entry, platform)) throw new Error("launcher target differs");
368
+ if (canonicalEntry === null) canonicalEntry = normalizePath(await realpath(entry), platform);
369
+ if (normalizePath(await realpath(path), platform) !== canonicalEntry) throw new Error("launcher target differs");
368
370
  } else if (metadata.isFile()) {
369
371
  const content = await readFile(path, "utf8");
370
372
  if (content.length > 32_768 || !content.replaceAll("\\", "/").includes(expectedSuffix)) throw new Error("launcher content differs");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@timurproko/a1-install",
3
- "version": "0.2.1-dev.602",
3
+ "version": "0.2.1-dev.603",
4
4
  "description": "Dependency-free installer for a1",
5
5
  "type": "module",
6
6
  "bin": {