@iobroker/js-controller-common 4.0.6 → 4.0.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.
@@ -1474,20 +1474,15 @@ async function detectPackageManagerWithFallback(cwd) {
1474
1474
  }
1475
1475
  );
1476
1476
  } catch {
1477
- // Lockfile not found, try again without requiring a lockfile
1477
+ // Lockfile not found, use default to avoid picking up a wrong package manager
1478
+ // like a globally installed yarn
1478
1479
  }
1479
1480
 
1480
1481
  // Since we have no lockfile to rely on, assume the root dir is 2 levels above js-controller
1481
1482
  const ioBrokerRootDir = path.join(getControllerDir(), '../..');
1482
- try {
1483
- return await detectPackageManager({ cwd: ioBrokerRootDir, requireLockfile: false });
1484
- } catch {
1485
- // Lockfile not found, use default
1486
- }
1487
-
1488
- // Fallback to npm
1483
+ // And fallback to npm
1489
1484
  const pak = new packageManagers.npm();
1490
- pak.cwd = ioBrokerRootDir;
1485
+ pak.cwd = cwd || ioBrokerRootDir;
1491
1486
  return pak;
1492
1487
  }
1493
1488
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iobroker/js-controller-common",
3
- "version": "4.0.6",
3
+ "version": "4.0.7",
4
4
  "engines": {
5
5
  "node": ">=12.0.0"
6
6
  },
@@ -47,5 +47,5 @@
47
47
  "lib/",
48
48
  "index.js"
49
49
  ],
50
- "gitHead": "3581cca2a0661a5fc346e5cb99bf664898b3d652"
50
+ "gitHead": "2237fea5948423f64650a3cc58286eec11335729"
51
51
  }