Yarn: feature request: add yarn run options to remove metadata on the output

Created on 6 Feb 2017  路  2Comments  路  Source: yarnpkg/yarn

Do you want to request a feature or report a bug?

feature

What is the current behavior?

every yarn run wrap the output with header + footer

$ yarn run myscript
yarn run v0.19.1
$ myscript
MYSCRIPT OUTPUT
Done in 2.54s.

And it's not possible to remove the header and the footer.

What is the expected behavior?

I would expect options to not have the header and the footer

Possible options for yarn run could be:

--pure-stdout
--no-header
--no-footer
--quiet

Please mention your node.js, yarn and operating system version.

node: v6.9.1
macosx 10.11.6

Most helpful comment

@stvkoch don't think that hits the primary use case which is being able to run a command and then pipe the output to other programs. Making it "silent" means there is NO output which is not as useful or at least has a different use.

As a _for-instance_, I have a command I run which dumps an XML output to stdout but because it's preceded by the "yarn run 1.5.1", etc. it can't be parsed as XML by programs I pipe it to

All 2 comments

Hi jmfrancois,

You should use:

yarn -s run yourScript

@stvkoch don't think that hits the primary use case which is being able to run a command and then pipe the output to other programs. Making it "silent" means there is NO output which is not as useful or at least has a different use.

As a _for-instance_, I have a command I run which dumps an XML output to stdout but because it's preceded by the "yarn run 1.5.1", etc. it can't be parsed as XML by programs I pipe it to

Was this page helpful?
0 / 5 - 0 ratings