Skip to content

Commit 9d0660b

Browse files
authored
Merge pull request #12 from ivangrynenko/fix/curl-pipe-hanging
fix: prevent hanging when script is piped through curl
2 parents f052ad7 + 27f3150 commit 9d0660b

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed

.cursor/UPDATE.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,32 @@
11
# Cursor Rules Updates
22

3+
## Version 1.0.6 - 2025-08-20
4+
5+
### AGENTS.md Documentation Added
6+
7+
**New Documentation:**
8+
- Added comprehensive AGENTS.md guide for using Cursor Rules with Cursor AI
9+
- Links to all rule bundles (Core, Web Stack, Python, JavaScript Security)
10+
- Tag-based selection documentation and examples
11+
- Installation options reference guide
12+
13+
**Installer Improvements:**
14+
- Fixed hanging issue when piping installer through curl
15+
- Added proper STDIN handling for piped execution
16+
- Improved argument parsing for curl-based installation
17+
- Added fclose(STDIN) to prevent PHP from waiting for input after completion
18+
19+
**Bug Fixes:**
20+
- Resolved script hanging when using `curl ... | php` commands
21+
- Fixed argument parsing when using `--` separator with piped input
22+
- Corrected PHP_SELF detection for piped execution
23+
24+
**File:** `install.php`, `AGENTS.md`
25+
**Impact:** Major improvement to installation experience and documentation
26+
**Breaking Changes:** None - backward compatible
27+
28+
---
29+
330
## Version 1.0.5 - 2025-01-03
431

532
### Major Updates to Pull Request Review Instructions

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)