Skip to content

Add flag to prevent echo-ing command invocation when running script #12375

@miss-programgamer

Description

@miss-programgamer

Is your feature request related to a problem? Please describe.

When running a script, composer will print out the command invocation in addition to the command output. This is undesirable for a number of use cases.

$ composer inspire
> php artisan inspire

  “ Very little is needed to make a happy life. ”
  — Marcus Aurelius

Describe the solution you'd like

I would like a flag like --echo=false, or even --silent like in npm for instance which would suppress the echo-ed command.

$ composer inspire --echo=false

  “ Very little is needed to make a happy life. ”
  — Marcus Aurelius

Describe alternatives you've considered

I tried using --quiet, but that suppresses all output, which is frankly baffling because I struggle to think of a use case for this flag at all...

$ composer inspire --quiet

Additional context

For completeness, here's how I configured this test script in my composer.json file. It's nothing special.

"scripts": {
    "inspire": [
        "php artisan inspire"
    ]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions