Skip to content

Commit

Permalink
Merge pull request #45 from gogetdata/update_prefix_search
Browse files Browse the repository at this point in the history
Update prefix base tracking
  • Loading branch information
mikecormier authored Oct 1, 2020
2 parents ccf18a4 + d88b76d commit 51d527f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ggd/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -703,9 +703,6 @@ def prefix_in_conda(prefix):
env_var_names[name] = env_path.rstrip("/")
env_var_paths[env_path.rstrip("/")] = name

## Get the base/first conda environment
cbase = min(env_var_paths.keys())

prefix = prefix.rstrip("/")

## Check that the file is in the environment lists
Expand All @@ -715,6 +712,9 @@ def prefix_in_conda(prefix):
## Get the prefix path dd
prefix_path = get_conda_prefix_path(prefix)

## Get the base/first conda environment for all environments that are subdirs of the specified prefix
cbase = min([x for x in env_var_paths.keys() if x in prefix_path])

## Check that the file path includes the conda base directory
if cbase not in prefix_path:
raise CondaEnvironmentNotFound(prefix)
Expand Down

0 comments on commit 51d527f

Please sign in to comment.