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

Error "Can't open file" when using -g key with nontrivial path #537

Closed
arodomanov opened this issue Apr 22, 2024 · 3 comments
Closed

Error "Can't open file" when using -g key with nontrivial path #537

arodomanov opened this issue Apr 22, 2024 · 3 comments
Labels
bug unexpected behaviour; should be a priority for fixing contribution Thank you to the contributor! implemented implemented tag means that either an enhancement or feature request has been implemented, or bugfix

Comments

@arodomanov
Copy link

Hi,

After the recent update of latexindent, I started receiving a new error every time I try to run the script with the -g /dev/null flag (on Linux).

Problem description

Here is a concrete example. I have the following very simple .tex file:

% main.tex
Just some text.

I run the following command in the terminal:

latexindent -g /dev/null main.tex

and receive the error code 2 with the following output:

% main.tex
Just some text.
Can't open file: No such file or directory at /usr/local/texlive/2024/texmf-dist/scripts/latexindent/LatexIndent/UTF8CmdLineArgsFileOperation.pm line 73.

It seems that there is nothing special about /dev/null as the command fails in the exact same way if I run, for example,

latexindent -g /tmp/latexindent-log.txt main.tex

However, strangely enough, everything works fine once I run the above example without the /tmp/ in the path:

latexindent -g latexindent-log.txt main.tex

Version of latexindent

I'm using the most recent version 3.23.9, 2024-04-06 but the problem didn't appear in the version a few months back (I don't remember the exact number).

@cmhughes
Copy link
Owner

@fengzyf can you take a look at this?

fengzyf pushed a commit to fengzyf/latexindent.pl that referenced this issue Apr 23, 2024
cmhughes pushed a commit that referenced this issue Apr 28, 2024
Co-authored-by: saxyx <50071422+saxyx@users.noreply.github.com>
@cmhughes cmhughes added bug unexpected behaviour; should be a priority for fixing implemented implemented tag means that either an enhancement or feature request has been implemented, or bugfix contribution Thank you to the contributor! labels Apr 28, 2024
@cmhughes
Copy link
Owner

This has been fixed as of #538

It'll be part of the next release. Please leave this issue open until I've made the release, hopefully coming soon...

@cmhughes
Copy link
Owner

implemented and released at https://github.com/cmhughes/latexindent.pl/releases/tag/V3.24

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug unexpected behaviour; should be a priority for fixing contribution Thank you to the contributor! implemented implemented tag means that either an enhancement or feature request has been implemented, or bugfix
Projects
None yet
Development

No branches or pull requests

2 participants