Skip to content

Commit

Permalink
Merge pull request #112 from Macarse/issue111
Browse files Browse the repository at this point in the history
fixes #111
  • Loading branch information
iamdefinitelyahuman authored Nov 20, 2020
2 parents 5531db5 + 2c67f88 commit 99497f1
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions solcx/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -614,10 +614,16 @@ 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 Path(filename).suffix == ".exe":
install_path.mkdir()
with open(install_path.joinpath("solc.exe"), "wb") as fp:
fp.write(content)

else:
with 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 99497f1

Please sign in to comment.