Skip to content

Commit

Permalink
Add support for setting installation path to CLI install script (#8446)
Browse files Browse the repository at this point in the history
  • Loading branch information
banool authored May 31, 2023
1 parent 2340a1a commit c522f80
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions developer-docs-site/static/scripts/install_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,13 +215,13 @@ def __init__(
version: Optional[str] = None,
force: bool = False,
accept_all: bool = False,
path: Optional[str] = None,
bin_dir: Optional[str] = None,
) -> None:
self._version = version
self._force = force
self._accept_all = accept_all
self._bin_dir = Path(bin_dir).expanduser() if bin_dir else None

self._bin_dir = None
self._release_info = None
self._latest_release_info = None

Expand Down Expand Up @@ -514,12 +514,17 @@ def main():
action="store_true",
default=False,
)
parser.add_argument(
"--bin-dir",
help="If given, the CLI binary will be downloaded here instead",
)

args = parser.parse_args()

installer = Installer(
force=args.force,
accept_all=args.accept_all or not is_interactive(),
bin_dir=args.bin_dir,
)

try:
Expand Down

0 comments on commit c522f80

Please sign in to comment.