Skip to content

Feature Request: Separate stderr from stdout in execute function #114

@rabbull

Description

@rabbull

Thanks for your work on this project! It's incredibly useful!

However, I noticed that the execute function merges the stderr output of the container into stdout.

output = subprocess.check_output(command, stderr=subprocess.STDOUT, shell=True)

This makes it difficult to distinguish between standard output and error messages. This makes things partically tricky when working with structured outputs (say, JSON), where warnings that can be ignored are printed to standard error. Merged output can't be decoded and it's challenging to filter-out warning messages.

Would it be possible to modify the execute function, to return stdout and stderr separately, or provide an option to keep them distinct? This would greatly improve usability when handling container output.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions