Skip to content

Commit

Permalink
Adjust offline fix to work for a broader range of potential target Co…
Browse files Browse the repository at this point in the history
…ndas.

This logic could in theory be backported all the way to 16.01 I suppose now.
  • Loading branch information
jmchilton committed Feb 17, 2017
1 parent f53b647 commit d37ed7e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/galaxy/tools/deps/conda_util.py
Expand Up @@ -529,8 +529,11 @@ def build_isolated_environment(
)
export_paths.append(export_path)
create_args = ["--unknown"]
if conda_context.conda_version < LooseVersion("4.3"):
create_args.append("--offline")
# Works in 3.19 and 4.2 - not in 4.0 and 4.3.
offline_works = conda_context.conda_version < LooseVersion("4") or \
(conda_context.conda_version >= LooseVersion("4.2") and conda_context.conda_version < LooseVersion("4.3"))
if offline_works:
create_args.extend(["--offline"])
else:
create_args.extend(["--use-index-cache"])
if path is None:
Expand Down

0 comments on commit d37ed7e

Please sign in to comment.