Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix clean console #5629

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

dimaslanjaka
Copy link
Contributor

@dimaslanjaka dimaslanjaka commented Feb 9, 2025

What does it do?

  • test script failed error, because original bound function should have parameter, but the usage not have it. here the screenshoot.

image

  • On windows 10 git scm, the git hook file should have shebang #!/bin/sh, otherwise should got error like below screenshoot

image

Pull request tasks

  • Add test cases for the changes.
  • Passed the CI test.

Copy link

github-actions bot commented Feb 9, 2025

How to test

git clone -b fix-clean-console https://github.com/dimaslanjaka/hexo.git
cd hexo
npm install
npm test

@coveralls
Copy link

Pull Request Test Coverage Report for Build 13221663076

Details

  • 2 of 2 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 99.448%

Totals Coverage Status
Change from base Build 13176180491: 0.0%
Covered Lines: 9729
Relevant Lines: 9783

💛 - Coveralls

@dimaslanjaka
Copy link
Contributor Author

@SukkaW need review

@@ -1 +1,3 @@
#!/bin/sh

Copy link
Member

@uiolee uiolee Feb 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but got error on my windows, see the screenshoot

Copy link
Contributor Author

@dimaslanjaka dimaslanjaka Feb 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

git scm windows version still need shebang. and shebang still allowed by husky. here the doc, Note section

image

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could see your screenshot of error. However, I could not reproduce on my window.

@@ -2,7 +2,8 @@ import Promise from 'bluebird';
import { exists, unlink, rmdir } from 'hexo-fs';
import type Hexo from '../../hexo';

function cleanConsole(this: Hexo): Promise<[void, void, any]> {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// eslint-disable-next-line @typescript-eslint/no-unused-vars

Even if I delete it, eslint have not report any errors.

@uiolee
Copy link
Member

uiolee commented Feb 13, 2025

I can't reproduce the two questions you mentioned, hexo ci also shows normal. I'll suspect the problem comes from your operating environment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants