Giter Site home page Giter Site logo

Comments (10)

cmhughes avatar cmhughes commented on September 22, 2024 1

from latexindent.pl.

tdegeus avatar tdegeus commented on September 22, 2024 1

I don't know what is going on, but I do think it might be more the pre-commit core that should be queried: the Perl package that poses problems might not even be a direct dependency of latenindent.

Regardless you could work around with the latexindent-conda hook, that use Conda's Perl

from latexindent.pl.

eggplants avatar eggplants commented on September 22, 2024
  • /home/eggplants/.cache/pre-commit/pre-commit.log

version information

pre-commit version: 2.19.0
git --version: git version 2.34.1
sys.version:
    3.10.4 (main, May 22 2022, 05:10:45) [GCC 11.2.0]
sys.executable: /home/eggplants/.pyenv/versions/3.10.4/bin/python3.10
os.name: posix
sys.platform: linux

error information

An unexpected error has occurred: PermissionError: [Errno 1] Operation not permitted: '/home/eggplants/.cache/pre-commit/repo95rn1aiq/perl_env-default/lib/perl5/LatexIndent/BlankLines.pm'
Traceback (most recent call last):
  File "/home/eggplants/.pyenv/versions/3.10.4/lib/python3.10/shutil.py", line 676, in _rmtree_safe_fd
    os.unlink(entry.name, dir_fd=topfd)
PermissionError: [Errno 13] Permission denied: 'BlankLines.pm'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/eggplants/.pyenv/versions/3.10.4/lib/python3.10/site-packages/pre_commit/error_handler.py", line 73, in error_handler
    yield
  File "/home/eggplants/.pyenv/versions/3.10.4/lib/python3.10/site-packages/pre_commit/main.py", line 389, in main
    return run(args.config, store, args)
  File "/home/eggplants/.pyenv/versions/3.10.4/lib/python3.10/site-packages/pre_commit/commands/run.py", line 414, in run
    install_hook_envs(to_install, store)
  File "/home/eggplants/.pyenv/versions/3.10.4/lib/python3.10/site-packages/pre_commit/repository.py", line 223, in install_hook_envs
    _hook_install(hook)
  File "/home/eggplants/.pyenv/versions/3.10.4/lib/python3.10/site-packages/pre_commit/repository.py", line 77, in _hook_install
    rmtree(hook.prefix.path(venv))
  File "/home/eggplants/.pyenv/versions/3.10.4/lib/python3.10/site-packages/pre_commit/util.py", line 257, in rmtree
    shutil.rmtree(path, ignore_errors=False, onerror=handle_remove_readonly)
  File "/home/eggplants/.pyenv/versions/3.10.4/lib/python3.10/shutil.py", line 722, in rmtree
    _rmtree_safe_fd(fd, path, onerror)
  File "/home/eggplants/.pyenv/versions/3.10.4/lib/python3.10/shutil.py", line 655, in _rmtree_safe_fd
    _rmtree_safe_fd(dirfd, fullname, onerror)
  File "/home/eggplants/.pyenv/versions/3.10.4/lib/python3.10/shutil.py", line 655, in _rmtree_safe_fd
    _rmtree_safe_fd(dirfd, fullname, onerror)
  File "/home/eggplants/.pyenv/versions/3.10.4/lib/python3.10/shutil.py", line 655, in _rmtree_safe_fd
    _rmtree_safe_fd(dirfd, fullname, onerror)
  File "/home/eggplants/.pyenv/versions/3.10.4/lib/python3.10/shutil.py", line 678, in _rmtree_safe_fd
    onerror(os.unlink, fullname, sys.exc_info())
  File "/home/eggplants/.pyenv/versions/3.10.4/lib/python3.10/site-packages/pre_commit/util.py", line 253, in handle_remove_readonly
    os.chmod(p, os.stat(p).st_mode | stat.S_IWUSR)
PermissionError: [Errno 1] Operation not permitted: '/home/eggplants/.cache/pre-commit/repo95rn1aiq/perl_env-default/lib/perl5/LatexIndent/BlankLines.pm'

from latexindent.pl.

cmhughes avatar cmhughes commented on September 22, 2024

@Holzhaus @tdegeus any ideas?

from latexindent.pl.

eggplants avatar eggplants commented on September 22, 2024

If I had a Dockerfile, I feel like I could run it with docker_image like pre-commit-shfmt and it would not fail with local permissions.

from latexindent.pl.

eggplants avatar eggplants commented on September 22, 2024

Suggestion

- id: latexindent-docker
  name: latexindent.pl
  description: Run latexindent.pl (get dependencies using DockerHub)
  entry: csegarragonz/latexindent:0.0.1
  language: docker_image
  types: [tex]
  args: ["--overwriteIfDifferent", "--silent", "--local"]

from latexindent.pl.

Holzhaus avatar Holzhaus commented on September 22, 2024

@Holzhaus @tdegeus any ideas?

The sudo prompt in the log is suspicious. It should not be necessary to input your root password. Possibly a misconfigured perl installation or some bug in pre-commit or maybe @eggplants ran pre-commit with sudo...

Anyway, I don't think this has anything to do with latexindent in particular.

from latexindent.pl.

cmhughes avatar cmhughes commented on September 22, 2024

Thanks for your work on docker @eggplants :)

I've released V3.18 https://github.com/cmhughes/latexindent.pl/releases/tag/V3.18

Are you happy if we close this issue?

from latexindent.pl.

cmhughes avatar cmhughes commented on September 22, 2024

@eggplants can you take a look at the error log at

https://github.com/cmhughes/latexindent.pl/actions/runs/3816377283/workflow

Any ideas what has gone wrong?

from latexindent.pl.

cmhughes avatar cmhughes commented on September 22, 2024

@eggplants please ignore my previous message, all resolved :)

from latexindent.pl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.