Skip to content

Commit

Permalink
Maybe?
Browse files Browse the repository at this point in the history
  • Loading branch information
nsoranzo committed Sep 30, 2024
1 parent 4c0a659 commit 1de24d9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/galaxy/celery/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def setup_data_table_manager(app):
@lru_cache
def cached_create_tool_from_representation(app: MinimalManagerApp, raw_tool_source: str):
return create_tool_from_representation(
app=app, raw_tool_source=raw_tool_source, tool_dir="", tool_source_class="XmlToolSource"
app=app, raw_tool_source=raw_tool_source, tool_source_class="XmlToolSource"
)


Expand Down
3 changes: 3 additions & 0 deletions lib/galaxy/tools/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1129,6 +1129,7 @@ def parse(self, tool_source: ToolSource, guid: Optional[str] = None, dynamic: bo
version_cmd_interpreter = tool_source.parse_version_command_interpreter()
if version_cmd_interpreter:
executable = self.version_string_cmd.split()[0]
assert self.tool_dir is not None
abs_executable = os.path.abspath(os.path.join(self.tool_dir, executable))
command_line = self.version_string_cmd.replace(executable, abs_executable, 1)
self.version_string_cmd = f"{version_cmd_interpreter} {command_line}"
Expand Down Expand Up @@ -1267,6 +1268,7 @@ def __parse_legacy_features(self, tool_source: ToolSource):
# map hook to function
self.hook_map[key] = value
file_name = code_elem.get("file")
assert self.tool_dir is not None
code_path = os.path.join(self.tool_dir, file_name)
if self._allow_code_files:
with open(code_path) as f:
Expand Down Expand Up @@ -1349,6 +1351,7 @@ def tests(self):
def _repository_dir(self):
"""If tool shed installed tool, the base directory of the repository installed."""
if getattr(self, "tool_shed", None):
assert self.tool_dir is not None
tool_dir = Path(self.tool_dir)
for repo_dir in itertools.chain([tool_dir], tool_dir.parents):
if repo_dir.name == self.repository_name and repo_dir.parent.name == self.installed_changeset_revision:
Expand Down

0 comments on commit 1de24d9

Please sign in to comment.