Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

subprocess stderr should be captured and reported

未关闭
#79 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
45/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
git, python
领域
cli

调研方向

从 traceback 中显示的 subprocess.run 封装器以及触发 git push 的 README 工作流开始。重现四个分支的 push,然后验证失败报告包含来自 stderr 的远程拒绝信息。

由索引模型根据 Issue 内容生成。

描述

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.

主要语言
Python
星标
569
派生
43
PR 合并指标
30 天内没有已合并 PR

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

modular/stack-pr 的其他 Issue

查看 modular/stack-pr 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。