Skip to content

Feature request: corollary to sh that captures stdout #678

@jasonkarns

Description

@jasonkarns

It seems a common occurrence for me to have custom tasks that need to invoke a shell command, and capture the output.

The "simple" solution is to use backticks or %x to capture the command's stderr/stdout. However, using that isn't safe or recommended. Further, it loses all the helpful verbose and noop capabities that rake's own sh provides.

What do others do in this situation? Would it be helpful to have a version of sh that captures stderr and stdout? (Or to upgrade sh such that the resulting response object has stderr and stdout?)

Any other alternatives I'm missing?

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