Comments (10)
from latexindent.pl.
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.
/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.
from latexindent.pl.
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.
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.
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.
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.
@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.
@eggplants please ignore my previous message, all resolved :)
from latexindent.pl.
Related Issues (20)
- [Feature] More friendly support for CJK words (characters) HOT 18
- [latexindent.exe] -GCString switch cannot run normally HOT 2
- Exclude `table` and `tabular` from indentation HOT 3
- Feature Request: Support spreadtab block HOT 4
- can't run it, neither after `tlmgr` nor as a Perl script HOT 4
- Error "Can't open file" when using `-g` key with nontrivial path HOT 3
- [windows] conda installation fail due to perl version HOT 6
- Format tabular for fullwidth fonts HOT 2
- [Bug] Incorrect indentation amount when have a long config with tabualrray package HOT 7
- Can't find string terminator '"' error - bug? HOT 7
- the future of multirows in _tabularray_ package would let latexindent format the code incorrectly HOT 10
- Indenting of tikz arrow specification HOT 4
- Incorrect encoding (possiblely due to #505) HOT 6
- Error when specifiying `lookForAlignDelims` in command line HOT 3
- text wrapping comment text to 3 HOT 6
- Additional indentation in text after displaymath when textWrapOptions when is set to after HOT 4
- Wrong indentation for equation in command with subscript in superscript HOT 2
- Incorrect indentation in argument HOT 3
- Labels in the same line as `\begin` HOT 7
- `oneSentencePerLine` also breaks lines on abbreviations HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from latexindent.pl.