Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for setting installation path to CLI install script #8446

Merged
merged 1 commit into from
May 31, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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