Skip to content

Commit

Permalink
Install latest if no binaries are found
Browse files Browse the repository at this point in the history
  • Loading branch information
Nat Chin committed Nov 8, 2023
1 parent f97eaed commit a05c6c3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion solc_select/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
halt_incompatible_system,
halt_old_architecture,
upgrade_architecture,
get_latest_release
)

# pylint: disable=too-many-branches
Expand All @@ -40,7 +41,7 @@ def solc_select() -> None:
parser_use = subparsers.add_parser("use", help="change the version of global solc compiler")
parser_use.add_argument(
USE_VERSION, help="solc version you want to use (eg: 0.4.25)", type=valid_version, nargs="?"
)
)
parser_use.add_argument("--always-install", action="store_true")
parser_use = subparsers.add_parser("versions", help="prints out all installed solc versions")
parser_use.add_argument(SHOW_VERSIONS, nargs="*", help=argparse.SUPPRESS)
Expand Down Expand Up @@ -84,6 +85,9 @@ def solc_select() -> None:


def solc() -> None:
if installed_versions() == []:
print("No solc versions found, installing latest")
switch_global_version(version=get_latest_release(),always_install=True)
res = current_version()
if res:
(version, _) = res
Expand Down

0 comments on commit a05c6c3

Please sign in to comment.