Skip to content

Commit

Permalink
Merge pull request #971 from eth-brownie/feat-load-packages
Browse files Browse the repository at this point in the history
Load installed packages as projects
  • Loading branch information
iamdefinitelyahuman authored Feb 24, 2021
2 parents 795c562 + 9d31762 commit 06f539d
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions brownie/project/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -704,9 +704,15 @@ def load(project_path: Union[Path, str, None] = None, name: Optional[str] = None
"which is different from the current working directory",
BrownieEnvironmentWarning,
)
else:
project_path = Path(project_path)
if project_path.resolve() != check_for_project(project_path):
packages_path = _get_data_folder().joinpath("packages")
if not project_path.is_absolute() and packages_path.joinpath(project_path).exists():
project_path = packages_path.joinpath(project_path)
else:
project_path = None

elif Path(project_path).resolve() != check_for_project(project_path):
project_path = None
if project_path is None:
raise ProjectNotFound("Could not find Brownie project")

Expand Down

0 comments on commit 06f539d

Please sign in to comment.