jumanjihouse / pre-commit-hooks

git pre-commit hooks that work with http://pre-commit.com/
MIT License
114 stars 52 forks source link

Markdownlint fails with error in ruby gem install fake_gem__-0.0.0gem #86

Closed richtong closed 3 years ago

richtong commented 3 years ago

Ok I've narrowed this down to markdownlint when I run pre-commit run --all-files with

- repo: https://github.com/jumanjihouse/pre-commit-hooks
  rev: 2.1.5
  hooks:
     -id: markdownlint

I get the errpr complaining about installation of fake gems. I'm on MacoS Big Sur with brew install rudy and ruby --version is '3.0.0p0`; so wondering if markdownlint does not get along with ruby 3.0?

[INFO] Installing environment for https://github.com/jumanjihouse/pre-commit-hooks.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
An unexpected error has occurred: CalledProcessError: command: ('/usr/local/Cellar/ruby/3.0.0_1/bin/ruby', '/usr/local/opt/ruby/bin/gem', 'install', '--no-document', '--no-format-executable', 'fake_gem__-0.0.0.gem')
return code: 1
expected return code: 0
stdout: (none)
stderr:
    ERROR:  While executing gem ... (NoMethodError)
        undefined method `request' for nil:NilClass
richtong commented 3 years ago

OK I see the issue, I had installed the node version of Markdownlint and it wants the ruby gem version, so might want to note that somewhere.

clownrat6 commented 3 years ago

The version of ruby may need to be lower than v3.