From e873222735042de6ec5b46e97c840de660afdc96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= <sebastien@dynare.org> Date: Thu, 9 Sep 2021 11:25:50 +0200 Subject: [PATCH] =?UTF-8?q?Fix=20detection=20of=20pdflatex=20following=20t?= =?UTF-8?q?he=20deprecation=20of=20=E2=80=9Cwhich=E2=80=9D=20in=20Debian?= =?UTF-8?q?=20Bookworm?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/@report/compile.m | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/@report/compile.m b/src/@report/compile.m index b34d935..cba0ffa 100644 --- a/src/@report/compile.m +++ b/src/@report/compile.m @@ -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 -- GitLab