Skip to content

Commit

Permalink
Fix conda resolver when conda_auto_init = True and install = False
Browse files Browse the repository at this point in the history
Conda dependencies were being prematurely installed during installation of repositories from the ToolShed (at the point where we are just trying to list already installed dependencies).
  • Loading branch information
blankenberg committed Feb 1, 2017
1 parent 9dc1bbd commit 3172597
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions lib/galaxy/tools/deps/resolvers/conda.py
Expand Up @@ -160,7 +160,12 @@ def resolve_all(self, requirements, **kwds):
dependencies = []

is_installed = self.conda_context.has_env(env)
if not is_installed and (self.auto_install or kwds.get('install', False)):
install = kwds.get('install', None)
if install is None:
install = not is_installed and self.auto_install
elif install:
install = not is_installed
if install:
is_installed = self.install_all(conda_targets)

if is_installed:
Expand Down Expand Up @@ -209,7 +214,12 @@ def resolve(self, requirement, **kwds):
preserve_python_environment = kwds.get("preserve_python_environment", False)

job_directory = kwds.get("job_directory", None)
if not is_installed and (self.auto_install or kwds.get('install', False)):
install = kwds.get('install', None)
if install is None:
install = not is_installed and self.auto_install
elif install:
install = not is_installed
if install:
is_installed = self.install_dependency(name=name, version=version, type=type)

if not is_installed:
Expand Down

0 comments on commit 3172597

Please sign in to comment.