gm-kilo 2.0.166 → 2.0.167
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/hooks/stop-hook.js +8 -4
- package/package.json +1 -1
package/hooks/stop-hook.js
CHANGED
|
@@ -22,10 +22,14 @@ const run = () => {
|
|
|
22
22
|
if (fs.existsSync(prdFile)) {
|
|
23
23
|
const prdContent = fs.readFileSync(prdFile, 'utf-8').trim();
|
|
24
24
|
if (prdContent.length > 0) {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
let items;
|
|
26
|
+
try { items = JSON.parse(prdContent); } catch { items = null; }
|
|
27
|
+
if (!Array.isArray(items) || items.length > 0) {
|
|
28
|
+
return {
|
|
29
|
+
ok: false,
|
|
30
|
+
reason: `Work items remain in ${prdFile}. Remove completed items as they finish. Current items:\n\n${prdContent}`
|
|
31
|
+
};
|
|
32
|
+
}
|
|
29
33
|
}
|
|
30
34
|
}
|
|
31
35
|
return { ok: true };
|