mage icon indicating copy to clipboard operation
mage copied to clipboard

sh: Allow disabling of `run` log call

Open cflewis opened this issue 4 years ago • 2 comments

https://github.com/magefile/mage/blob/v1.9.0/sh/cmd.go#L129 executes a log statement that cannot be overridden. The only means of stopping this would be to call log.SetOutput() and modify this globally.

It would be nice if sh/ would allow setting a logger (even as a package global would be fine IMHO) so the logging could be controlled/intercepted.

cflewis avatar Feb 11 '20 21:02 cflewis

Hmm, yeah, this is a good point.

natefinch avatar Feb 12 '20 21:02 natefinch

@natefinch how would you feel about just removing this line for now? since it potentially also is a security concern, as it might print secrets to the console via cmd args.

ghostsquad avatar Mar 17 '20 04:03 ghostsquad