subprocess stderr should be captured and reported
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 569
- Forks
- 43
- PR merge metrics
- No merged PRs in 30d
Description
My very first use of stack-pr. Previously I would manage stacks quite manually. I followed the README precisely and got the error
Updating remote branches
Exitcode: 1
Stdout: None
Stderr: None
Traceback ...
...
return subprocess.run(list(map(str, cmd)), **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/subprocess.py", line 573, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['git', 'push', '-f', 'origin', 'frank-reve/stack/1:frank-reve/stack/1', 'frank-reve/stack/2:frank-reve/stack/2', 'frank-reve/stack/3:frank-reve/stack/3', 'frank-reve/stack/4:frank-reve/stack/4']' returned non-zero exit status 1.
When I run the git push command by hand, I get an error response. So the report from stack-pr that Stdout and Stderr is empty, seems wrong. I'm not sure if the error I get manually is stdout or stderr. The error is
remote: - Pushes can not update more than 3 branches or tags.
It would have been pretty valuable to see that right in the stack-pr output.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the subprocess.run wrapper shown in the traceback and the README workflow that triggers the git push. Reproduce the four-branch push, then verify that the failure report includes the remote rejection from stderr.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, python
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100