beachball
beachball copied to clipboard
Output changehint to stderr via console.error()
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.