Skip to content

Commit

Permalink
fixes ApeWorX#111
Browse files Browse the repository at this point in the history
  • Loading branch information
Macarse committed Nov 18, 2020
1 parent ebeb5c7 commit 1646d93
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions solcx/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -609,10 +609,15 @@ def _install_solc_windows(

temp_path = _get_temp_folder()
content = _download_solc(download, show_progress)
with zipfile.ZipFile(BytesIO(content)) as zf:
zf.extractall(str(temp_path))

temp_path.rename(install_path)
if content.endswith("exe"):
with open(install_path, "wb") as fp:
fp.write(content)

else:
zipfile.ZipFile(BytesIO(content)) as zf:
zf.extractall(str(temp_path))
temp_path.rename(install_path)


def _validate_installation(version: Version, solcx_binary_path: Union[Path, str, None]) -> None:
Expand Down

0 comments on commit 1646d93

Please sign in to comment.