beachball icon indicating copy to clipboard operation
beachball copied to clipboard

Output changehint to stderr via console.error()

Open mjpowersjr opened this issue 2 years ago • 0 comments

Background: I'm using the following command in a git pre-push hook:

yarn beachball check --changehint "🔧 Fix by running: yarn change"

This works as expected when the hook is triggered from a terminal. Surprisingly, vscode behaves differently. When attempting to push changes via vscode, if beachball has a exit code of 1, vscode only shows what has been logged to stdout. In this case, beachball's default error message is displayed, but the changehint is not.

Looking at the code, it looks like console.error() is used for the built-in message, while console.log() is used for the hint.

Fix: Use console.error() for both messages.

mjpowersjr avatar Jul 24 '22 20:07 mjpowersjr