Skip to content

Commit

Permalink
Sort versions chronologically
Browse files Browse the repository at this point in the history
  • Loading branch information
ardislu committed Dec 19, 2022
1 parent 7b493c6 commit 40423a8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions solc_select/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def solc_select() -> None:
versions = args.get(INSTALL_VERSIONS)
if not versions:
print("Available versions to install:")
for version in get_installable_versions():
for version in sorted(get_installable_versions(), key=lambda v: [int(s) for s in v.split(".")]):
print(version)
else:
install_artifacts(args.get(INSTALL_VERSIONS))
Expand All @@ -64,7 +64,7 @@ def solc_select() -> None:
res = current_version()
if res:
(current_ver, source) = res
for version in reversed(sorted(installed_versions())):
for version in sorted(installed_versions(), key=lambda v: [int(s) for s in v.split(".")]):
if res and version == current_ver:
print(f"{version} (current, set by {source})")
else:
Expand Down

0 comments on commit 40423a8

Please sign in to comment.