-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
🐛 Bug Description
The output from `gh pr create` command is not properly captured by command-stream, with the PR URL going to stderr instead of stdout, making it difficult to programmatically get the created PR URL.
🔴 Impact
- Can't capture PR URLs programmatically
- Automation scripts can't get PR links
- CI/CD workflows can't report PR URLs
📝 Problem Details
`gh pr create` outputs the PR URL to stderr, but command-stream may not properly capture or distinguish between stdout and stderr.
🔄 Reproduction
```javascript
const result = await $`gh pr create --title "Test" --body "Test PR"`;
console.log(result.stdout); // Empty or incomplete
console.log(result.stderr); // Contains the PR URL
```
🔧 Workaround
Capture both stdout and stderr:
```javascript
const result = await $`gh pr create 2>&1`;
// Or check both result.stdout and result.stderr
```
🔗 References
Metadata
Metadata
Assignees
Labels
No labels