From 18a58be4e02b66b2e3e5580fa903ece166f2750f Mon Sep 17 00:00:00 2001 From: Daniel Porteous Date: Wed, 31 May 2023 14:29:44 +0100 Subject: [PATCH] Add support for setting installation path to CLI install script --- developer-docs-site/static/scripts/install_cli.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/developer-docs-site/static/scripts/install_cli.py b/developer-docs-site/static/scripts/install_cli.py index 633926ae24713..3bce28e39a1b2 100644 --- a/developer-docs-site/static/scripts/install_cli.py +++ b/developer-docs-site/static/scripts/install_cli.py @@ -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 @@ -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: