Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions solcx/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,12 @@ def import_installed_solc(solcx_binary_path: Union[Path, str] = None) -> List[Ve
path_list = [_get_which_solc()]
except (FileNotFoundError, subprocess.CalledProcessError):
path_list = []

# extend with solc-select directory
home_dir = os.path.expanduser("~")
solc_select_dir = f"{home_dir}/.solc-select"
solc_select_artifacts_dir = f"{solc_select_dir}/artifacts"
path_list.extend(Path(solc_select_artifacts_dir).glob("solc*"))

# on OSX, also copy all versions of solc from cellar
if _get_os_name() == "macosx":
Expand Down Expand Up @@ -438,6 +444,9 @@ def install_solc(
LOGGER.info(f"solc {version} already installed at: {path}")
return version

if version in import_installed_solc():
return version

data = requests.get(BINARY_DOWNLOAD_BASE.format(_get_os_name(), "list.json"))
if data.status_code != 200:
raise ConnectionError(
Expand Down