adhdev 0.1.9 → 0.1.10
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/index.js +4 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -892,12 +892,13 @@ async function suggestGlobalInstall() {
|
|
|
892
892
|
const { execSync: execSyncLocal } = await import("child_process");
|
|
893
893
|
let isGloballyInstalled = false;
|
|
894
894
|
try {
|
|
895
|
-
const result = execSyncLocal("adhdev --
|
|
895
|
+
const result = execSyncLocal("npm list -g adhdev --json 2>/dev/null || npm list -g adhdev --json 2>nul", {
|
|
896
896
|
encoding: "utf-8",
|
|
897
|
-
timeout:
|
|
897
|
+
timeout: 1e4,
|
|
898
898
|
stdio: ["pipe", "pipe", "pipe"]
|
|
899
899
|
});
|
|
900
|
-
|
|
900
|
+
const parsed = JSON.parse(result);
|
|
901
|
+
isGloballyInstalled = !!parsed.dependencies?.adhdev;
|
|
901
902
|
} catch {
|
|
902
903
|
isGloballyInstalled = false;
|
|
903
904
|
}
|