From a4d0ed683362ca12ea0771ef231ec9423e891a2d Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 5 Mar 2022 12:06:56 -0800 Subject: [PATCH] sage.interfaces.four_ti_2: Use Executable.absolute_filename --- src/sage/interfaces/four_ti_2.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sage/interfaces/four_ti_2.py b/src/sage/interfaces/four_ti_2.py index dcf240a74d0..342815bda45 100644 --- a/src/sage/interfaces/four_ti_2.py +++ b/src/sage/interfaces/four_ti_2.py @@ -295,11 +295,11 @@ def call(self, command, project, verbose=True, *, options=()): [-5 3 0] """ import subprocess + import shlex feature = FourTi2Executable(command) - feature.require() - executable = feature.executable + executable = feature.absolute_filename() options = " ".join(options) - cmd = f'{executable} {options} {project}' + cmd = f'{shlex.quote(executable)} {options} {project}' if verbose is False: cmd += " > /dev/null 2> /dev/null" subprocess.call(cmd, shell=True, cwd=self.directory())