mrcrowl / vscode-hg

Integrated Mercurial source control for Visual Studio Code
MIT License
71 stars 37 forks source link

Print stdout in Hg log #183

Closed gd4Ark closed 2 years ago

gd4Ark commented 2 years ago

English is not my first language, so please forgive my grammatical errors

I added a pre-commit hook to the hg repository that uses eslint to check for syntax errors, and when I commit the code via vscode-hg, if an error occurs with eslint, it commits terminal, but I can't see any hint about the eslint rule in the hg ouput.

I see the following output.

error Command failed with exit code 1.
abort: pre-commit hook exited with status 1

error Command failed with exit code 1.
abort: pre-commit hook exited with status 1

Output of the terminal:

$ eslint '**/*.js' --cache --fix

/Users/4ark/project/helper/404.js
  9:7  error  'a' is assigned a value but never used  no-unused-vars

✖ 1 problem (1 error, 0 warnings)

error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

I think this is because vscode-hg only prints stderr, not stdout.

This is the internal implementation that I know through the source code:

Because I see that vscode sees the eslint rule error when doing a git commit. I would expect vscode-hg to have the same behaviour (perhaps an optional feature)

thx!

version: