microsoft / microsoft/beachball

Output changehint to stderr via console.error()

Open
#689 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.