Skip to content

Commit e79974c

Browse files
committed
fix: prevent hanging when script is piped through curl
- Added fclose(STDIN) before exit to prevent PHP from waiting for more input - Added flush() calls to ensure all output is sent before exit - This fixes the hanging issue when using curl | php piping
1 parent f052ad7 commit e79974c

File tree

2 files changed

+19
-57
lines changed

2 files changed

+19
-57
lines changed

.cursor/UPDATE.md

Lines changed: 8 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,11 @@
1-
# Cursor Rules Updates
1+
# Cursor Rules Installation
22

3-
## Version 1.0.5 - 2025-01-03
3+
**Version:** 1.0.5
4+
**Installation Date:** 2025-08-20 09:12:08 UTC
5+
**Rules Installed:** 7 files
46

5-
### Major Updates to Pull Request Review Instructions
7+
## Installation Type
8+
- Core rules (default)
69

7-
**Enhanced Multi-Language Support:**
8-
- Added comprehensive support for all languages in cursor rules (PHP, Python, JavaScript, TypeScript, CSS, HTML)
9-
- Implemented language-specific coding standards and security practices
10-
- Added framework-specific guidelines (Drupal, Django, React, Vue.js, Express.js)
11-
12-
**Large File Detection and Skipping:**
13-
- Added logic to skip compiled/minified files (>1MB, *.min.*, *-bundle.*, etc.)
14-
- Implemented vendor directory filtering (node_modules/, vendor/, dist/, build/)
15-
- Added auto-generated file detection to focus on source code only
16-
17-
**Improved Security Assessment:**
18-
- Language-specific security checks (SQL injection, XSS, command injection)
19-
- Framework-aware security considerations
20-
- OWASP compliance across all supported languages
21-
22-
**Enhanced Label Management:**
23-
- Added language-specific labels (lang/php, lang/python, lang/javascript, etc.)
24-
- Automatic language detection based on file extensions
25-
- Technology-specific colour coding using official language colours
26-
27-
**Technology Detection Process:**
28-
- File extension analysis for automatic language identification
29-
- Framework detection through config files (package.json, composer.json, etc.)
30-
- Project structure analysis for framework patterns
31-
- Dependency analysis and build tool detection
32-
33-
**Updated Review Checklist:**
34-
- File analysis requirements with mandatory large file skipping
35-
- Language-specific sections for targeted reviews
36-
- Enhanced security focus across all technologies
37-
- Performance considerations for each language
38-
39-
**File:** `new-pull-request.mdc`
40-
**Impact:** Major enhancement to code review capabilities across all supported languages
41-
**Breaking Changes:** None - backward compatible
42-
43-
---
44-
45-
## Previous Versions
46-
47-
### Version 1.0.4
48-
- Previous version (details to be added)
49-
50-
### Version 1.0.3
51-
- Previous version (details to be added)
52-
53-
### Version 1.0.2
54-
- Previous version (details to be added)
55-
56-
### Version 1.0.1
57-
- Previous version (details to be added)
58-
59-
### Version 1.0.0
60-
- Initial release
10+
## Source
11+
Rules downloaded from: https://github.com/ivangrynenko/cursor-rules

install.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1132,6 +1132,17 @@ function show_help(): void {
11321132

11331133
echo "\nInstallation " . ($success ? "completed successfully!" : "failed.") . "\n";
11341134
echo "Cursor AI will now use these rules when working with your codebase.\n";
1135+
1136+
// Ensure all output is flushed before exit
1137+
if (ob_get_level() > 0) {
1138+
ob_flush();
1139+
}
1140+
flush();
1141+
1142+
// Close stdin if it's open to prevent hanging
1143+
if (defined('STDIN') && is_resource(STDIN)) {
1144+
fclose(STDIN);
1145+
}
11351146

11361147
exit($success ? 0 : 1);
11371148
}

0 commit comments

Comments
 (0)