mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Don't template version command
This commit is contained in:
@@ -456,10 +456,6 @@ class ToolEvaluator:
|
||||
param_dict = self.param_dict
|
||||
interpreter = self.tool.interpreter
|
||||
version_string_cmd_raw = self.tool.version_string_cmd
|
||||
if version_string_cmd_raw:
|
||||
version_command_template = string.Template(version_string_cmd_raw)
|
||||
version_string_cmd = version_command_template.safe_substitute({"__tool_directory__": self.compute_environment.tool_directory()})
|
||||
command = f"{version_string_cmd} > {self.compute_environment.version_path()} 2>&1;\n{command}"
|
||||
command_line = None
|
||||
if not command:
|
||||
return
|
||||
@@ -483,6 +479,10 @@ class ToolEvaluator:
|
||||
tool_dir = os.path.abspath(self.tool.tool_dir)
|
||||
abs_executable = os.path.join(tool_dir, executable)
|
||||
command_line = command_line.replace(executable, f"{interpreter} {shlex.quote(abs_executable)}", 1)
|
||||
if version_string_cmd_raw:
|
||||
version_command_template = string.Template(version_string_cmd_raw)
|
||||
version_string_cmd = version_command_template.safe_substitute({"__tool_directory__": self.compute_environment.tool_directory()})
|
||||
command_line = f"{version_string_cmd} > {self.compute_environment.version_path()} 2>&1;\n{command_line}"
|
||||
self.command_line = command_line
|
||||
|
||||
def _build_config_files(self):
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<tool id="version_command_plain" name="version_command_plain" version="1.0.0">
|
||||
<version_command><![CDATA[
|
||||
echo "4.0.0"
|
||||
VERSION="4.0.0" echo "$VERSION"
|
||||
]]></version_command>
|
||||
<command><![CDATA[
|
||||
cp '$input' '$output'
|
||||
|
||||
Reference in New Issue
Block a user