cloud-mta-build-tool icon indicating copy to clipboard operation
cloud-mta-build-tool copied to clipboard

suppress printing runIndicator when running in batch context

Open ryenus opened this issue 1 year ago • 2 comments

While running mbt in an interactive context, having runIndicator enabled is quite nice, by indicating the build is work in progress rather than stuck.

  • https://github.com/SAP/cloud-mta-build-tool/blob/22052f6427fefe3b52a28ea7a0952581ca94dfb6/internal/artifacts/project.go#L146
  • https://github.com/SAP/cloud-mta-build-tool/blob/22052f6427fefe3b52a28ea7a0952581ca94dfb6/cmd/exec.go#L25

However, when running in a batch context, such as CI pipelines, having the dots mixed in the build logs is not really helpful.

It would be nice for mbt to add batch-mode support, which can suppress the runIndicator dots when run in batch mode.

ryenus avatar Aug 02 '24 06:08 ryenus

It would be nice to have a command line option like -B, with --batch-mode being the long option, to allow the user to disable the runIndicator dots when set.

And proposing -B here, because -b is already taken (for sbom). In the meantime Apache Maven also use -B and --batch-mode so that mbt and Apache Maven can be aligned on this.

ryenus avatar Aug 02 '24 06:08 ryenus

Hi ,

We appreciate your suggestion and will consider this requirement future. Thank you for your input.

Thanks Yutao

yutaoj avatar Nov 05 '24 02:11 yutaoj