semver icon indicating copy to clipboard operation
semver copied to clipboard

Feature request: Suppress stderr

Open aderito7 opened this issue 3 years ago • 5 comments

Good day, team

Currently I'm running versioning of script within my nx monorepo against Azure Pipelines. nx version my-project is being run in conjunction with other scripts such as npm install, etc, which should they fail for some reason I wish for the task to fail as well. At the moment jscutlery/semver is writing outputs to stderr, which I was hoping to request a feature to suppress (if not redirect to stdlog).

- task: Bash@3
    inputs:
      targetType: 'inline'
      script: bash myscript.sh
      failOnStderr: true

aderito7 avatar Dec 22 '21 10:12 aderito7

Hi @aderito7, I'm not sure to get it, semver writes to stderr even if it succeeds?

edbzn avatar Dec 29 '21 13:12 edbzn

@edbzn , it would appear so. At least the pipeline fails due to this

aderito7 avatar Jan 14 '22 09:01 aderito7

@aderito7 can you give the output?

edbzn avatar Jan 14 '22 17:01 edbzn

7c96096268498e5cd599c85cbb1b14b89f9206844f0911ede4a98342716385ef

aderito7 avatar Jan 14 '22 22:01 aderito7

Bump on this one. Same issue is being experienced on gitlab pipeline This has required adding:

version:
  allow_failure: true
  script:
  - nx affected:version

ERROR: Job failed: command terminated with exit code 1

Unfortunately allow_failure suppresses all errors.

aderito7 avatar Feb 09 '22 15:02 aderito7