Skip to content

merge os.exec and os.system #1637

@pznknmtb

Description

@pznknmtb

currently there are two similar signatures:

// system starts the specified command, waits for it to complete, and returns its code.
pub fn system(cmd string) int { 
...

// exec starts the specified command, waits for it to complete, and returns its output.
pub fn exec(_cmd string) ?string { 
...

having only code or only output is not sufficient (or clumsy) in certain cases.

please create a "unified" version that returns both, output and code (maybe also split output into stdout and stderr).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Feature/Enhancement RequestThis issue is made to request a feature or an enhancement to an existing one.

    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