Skip to content

Commit

Permalink
feat: multiple binary names (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielbraun89 authored Apr 13, 2023
1 parent 2afa8a2 commit 7c17421
Show file tree
Hide file tree
Showing 3 changed files with 141 additions and 118 deletions.
4 changes: 3 additions & 1 deletion nanolayer/__main__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import typer
import os

import typer

from nanolayer.cli.install import app as install_app
from nanolayer.utils.analytics import setup_analytics
from nanolayer.utils.settings import NanolayerSettings
Expand Down
8 changes: 4 additions & 4 deletions nanolayer/cli/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def install_aptitude_packages(
@app.command("gh-release")
def install_gh_release_binary(
repo: str,
binary_name: str,
binary_names: str = typer.Argument(None, help="comma separated list of binary names"),
version: str = "latest",
lib_name: Optional[str] = None,
asset_regex: Optional[str] = None,
Expand All @@ -149,12 +149,12 @@ def install_gh_release_binary(
force: bool = False,
arch: Optional[str] = None,
) -> None:
if binary_name == "":
raise typer.BadParameter("target cannot be empty string")
if binary_names == "":
raise typer.BadParameter("binary names cannot be empty string")

GHReleaseInstaller.install(
repo=repo,
binary_name=binary_name,
binary_names=binary_names.split(","),
lib_name=lib_name,
arch=arch,
bin_location=bin_location,
Expand Down
Loading

0 comments on commit 7c17421

Please sign in to comment.