jfrog / build-info-go

build-info-go is a Go library and a CLI, which allows generating build-info for a source code project.
https://www.buildinfo.org
Apache License 2.0
61 stars 34 forks source link

Improve failed npm command log #169

Open vmiko opened 1 year ago

vmiko commented 1 year ago

Hi folks,

Thank you for your library. I have some suggestions to improve it.

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

I'm aware that you need to send a buildinfo to stdout and all other log messages to stderr. But sometimes it's difficult to debug npm commands and understand what happens behind the scenes.

So, is it possible to send the stdout command result when commands go wrong ?

Try with a failed npm command that returns an error for example. Npm log messages are not very relevant on stderr. Sometimes there is useful information on stdout, but this library doesn't print it.

I have no idea, if it works the same for the other build tools (mvn, go, etc.)

Describe the solution you'd like to see

Maybe you should try to send the stdout command result in case of an error in the RunNpmCmd function before returning the error.

Describe alternatives you've considered /

Additional context /