pre-commit-ci / issues

public issues for https://pre-commit.ci
16 stars 3 forks source link

perl hook environment fails to build #153

Closed hdadhich01 closed 1 year ago

hdadhich01 commented 1 year ago

latexindent.pl fails to build here.

- repo: https://github.com/cmhughes/latexindent.pl
  rev: V3.19.1
  hooks:
  - id: latexindent

something to do with perl and how the ci server sets up hooks using it for their env

asottile commented 1 year ago

looks like perl wasn't ever implemented -- I'll probably start with adding a test for it in https://github.com/pre-commit-ci/runner-image

my guess is pre-commit's implementation of perl also leaks details outside of the pre-commit envs so I'll likely need to fix that as well in pre-commit itself (the error message above looks like it's writing to the working directory):

    [INFO] Installing environment for https://github.com/cmhughes/latexindent.pl.
    [INFO] Once installed this environment will be reused.
    [INFO] This may take a few minutes...
    An unexpected error has occurred: CalledProcessError: command: ('/usr/bin/perl', '/usr/bin/cpan', '-T', '.')
    return code: 30
    expected return code: 0
    stdout:
        Loading internal logger. Log::Log4perl recommended for better logging

    stderr:
        mkdir /src/.cpan: Read-only file system at /usr/share/perl/5.34/CPAN/HandleConfig.pm line 601.

    Check the log at /pc/pre-commit.log
asottile commented 1 year ago

perl hooks are now tested and supported -- should be fine to retry now!

hdadhich01 commented 1 year ago

works great, thanks