company-skill 3.1.0 → 3.1.1
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-guard.js +1 -9
- package/package.json +1 -1
package/hooks/stop-guard.js
CHANGED
|
@@ -21,15 +21,7 @@ if (fs.existsSync(cancelPath)) {
|
|
|
21
21
|
process.exit(0);
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
//
|
|
25
|
-
let count = 0;
|
|
26
|
-
try { count = parseInt(fs.readFileSync(counterPath, 'utf8')) || 0; } catch (e) {}
|
|
27
|
-
count++;
|
|
28
|
-
try { fs.writeFileSync(counterPath, String(count)); } catch (e) {}
|
|
29
|
-
if (count > 10) {
|
|
30
|
-
try { fs.unlinkSync(counterPath); } catch (e) {}
|
|
31
|
-
process.exit(0); // Allow stop, prevent infinite loop
|
|
32
|
-
}
|
|
24
|
+
// No limit. Runs until done or user cancels (touch .company/CANCEL).
|
|
33
25
|
|
|
34
26
|
// Check criteria
|
|
35
27
|
if (fs.existsSync(criteriaPath)) {
|