File: fix-verson-in-python-interpreter-search

package info (click to toggle)
klatexformula 4.1.0-1.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 21,972 kB
  • sloc: cpp: 42,925; xml: 1,636; python: 829; perl: 108; sh: 96; makefile: 18; lisp: 6
file content (25 lines) | stat: -rw-r--r-- 861 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
Description: Prevents using arbitrary programs starting with python*
Last-Update: 2020-12-26

--- a/src/klfbackend/klfblockprocess.cpp
+++ b/src/klfbackend/klfblockprocess.cpp
@@ -120,7 +120,7 @@
   KLF_DEBUG_BLOCK(KLF_FUNC_NAME) ;
   klfDbg("ext = " << ext) ;
   if (ext == "py") {
-    return detectInterpreterPath("python");
+    return detectInterpreterPath("python3");
   } else if (ext == "sh") {
     return detectInterpreterPath("bash");
   } else if (ext == "rb") {
--- a/src/klfconfig.cpp
+++ b/src/klfconfig.cpp
@@ -482,7 +482,7 @@
       BackendSettings.wantSVG.setDefaultValue(defaultsettings.wantSVG);
   }
 
-  ensure_interp_exe(BackendSettings.userScriptInterpreters, "py", "python");
+  ensure_interp_exe(BackendSettings.userScriptInterpreters, "py", "python3");
   ensure_interp_exe(BackendSettings.userScriptInterpreters, "sh", "bash");
 }