microsoft / microsoft/beachball
Output changehint to stderr via console.error()
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 815
- Forks
- 93
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 12
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the beachball check command's changehint output path and compare it with the built-in error output. Change the hint's console.log() call to console.error(), then verify that both messages appear when the command exits with status 1, including when run through a VS Code push.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, typescript
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100