@wipcomputer/wip-ldm-os 0.3.2 → 0.3.3
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/SKILL.md +1 -1
- package/bin/ldm.js +10 -4
- package/package.json +1 -1
package/SKILL.md
CHANGED
package/bin/ldm.js
CHANGED
|
@@ -111,8 +111,11 @@ function cleanStaleHooks() {
|
|
|
111
111
|
const match = h.command.match(/node\s+"?([^"]+)"?\s*$/);
|
|
112
112
|
if (!match) return true; // keep non-node commands
|
|
113
113
|
const scriptPath = match[1];
|
|
114
|
-
|
|
115
|
-
|
|
114
|
+
// /tmp/ paths will vanish on reboot, always treat as stale
|
|
115
|
+
const isTmp = scriptPath.startsWith('/tmp/') || scriptPath.startsWith('/private/tmp/');
|
|
116
|
+
if (existsSync(scriptPath) && !isTmp) return true;
|
|
117
|
+
const reason = isTmp ? '(temp path, will break on reboot)' : '(missing)';
|
|
118
|
+
console.log(` + Removed stale hook: ${event} -> ${scriptPath} ${reason}`);
|
|
116
119
|
cleaned++;
|
|
117
120
|
return false;
|
|
118
121
|
});
|
|
@@ -749,10 +752,13 @@ async function cmdDoctor() {
|
|
|
749
752
|
if (!h.command) continue;
|
|
750
753
|
const match = h.command.match(/node\s+"?([^"]+)"?\s*$/);
|
|
751
754
|
if (!match) continue;
|
|
752
|
-
|
|
755
|
+
const hookPath = match[1];
|
|
756
|
+
const isTmpPath = hookPath.startsWith('/tmp/') || hookPath.startsWith('/private/tmp/');
|
|
757
|
+
if (!existsSync(hookPath) || isTmpPath) {
|
|
753
758
|
staleHooks++;
|
|
754
759
|
if (!FIX_FLAG) {
|
|
755
|
-
|
|
760
|
+
const reason = isTmpPath ? '(temp path)' : '(missing)';
|
|
761
|
+
console.log(` ! Stale hook: ${event} -> ${hookPath} ${reason}`);
|
|
756
762
|
}
|
|
757
763
|
}
|
|
758
764
|
}
|