Skip to content

subprocess stderr should be captured and reported #79

@frank-reve

Description

@frank-reve

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions