Skip to content
Snippets Groups Projects
Verified Commit e8732227 authored by Sébastien Villemot's avatar Sébastien Villemot
Browse files

Fix detection of pdflatex following the deprecation of “which” in Debian Bookworm

parent 1059631a
No related branches found
No related tags found
No related merge requests found
......@@ -79,7 +79,9 @@ if isempty(opts.compiler)
middle = ' ';
opts.compiler = ['"' strtrim(opts.compiler) '"'];
elseif isunix
[status, opts.compiler] = system('which pdflatex');
% “which” has been deprecated in Debian Bookworm; rather use “command -v”
% which should work with any reasonably recent GNU/Linux shell
[status, opts.compiler] = system('command -v pdflatex');
end
assert(status == 0, ...
'@report.compile: Could not find a tex compiler on your system');
......@@ -131,4 +133,4 @@ if status ~= 0
error(['@report.compile: There was an error in compiling ' rfn '.pdf.' ...
' ' opts.compiler ' returned the error code: ' num2str(status)]);
end
end
\ No newline at end of file
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment