commit f0ce3f22bdd24f4909533701363039d270a2414f
Author: Pavel Sanda <[email protected]>
Date: Sun Sep 13 17:13:32 2026 +0200
Route the gate version probe through argv form
Just mechanical rewrite.
Tier 01 DiD / argv 04b: argv-form for gate version probe
https://www.mail-archive.com/[email protected]/msg226840.html
Assisted-by: Claude Opus 5
---
src/LaTeX.cpp | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/src/LaTeX.cpp b/src/LaTeX.cpp
index bb9687f59f..aa289a723d 100644
--- a/src/LaTeX.cpp
+++ b/src/LaTeX.cpp
@@ -903,18 +903,22 @@ bool isProcessorGated(string const & command)
// written files would run planted code.
createLyXTmpDir(FileName())
// makes a unique dir under the system temp; on failure we
leave the
// fail-safe gated=true.
- cmd_ret r{};
+ int probe_ret = Systemcall::NOSTART;
+ string probe_out;
FileName const probe_dir = createLyXTmpDir(FileName());
if (!probe_dir.empty()) {
FileName const saved = FileName::getcwd();
probe_dir.chdir();
- r = runCommand(quoteName(prog) + ' ' + p.version_arg);
+ Systemcall one;
+ probe_ret = one.startscriptArgv(prog, { p.version_arg },
+ &probe_out);
saved.chdir();
probe_dir.destroyDirectory();
}
smatch m;
regex const re(p.version_re);
- if (r.valid && regex_search(r.result, m, re)) {
+ if (probe_ret == Systemcall::OK
+ && regex_search(probe_out, m, re)) {
int const maj = convert<int>(m.str(1));
int const min = convert<int>(m.str(2));
gated = maj < p.min_major
--
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs