Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Rye not using user-chosen toolchain as default during installation (
#1054) Fixes #1024 Currently: * When installation calls `ensure_self_venv_with_toolchain` to bootstrap rye internals it would pass the `toolchain_version_request` variable as the version to install * If the `RYE_TOOLCHAIN_VERSION` env var is not set, then the value of `toolchain_version_request` remains None * During installation, `prompt_for_default_toolchain` is called to prompt the user for a version to select, asking the user `"Which version of Python should be used as default toolchain?"` * This function stores the user's selection in the `config_doc` TOML configuration and returns nothing * The user's toolchain version selection is thus never passed to the internals bootstrapping call Changes: * This fix makes `toolchain_version_request` mutable so it can be updated by the user's input * Function `prompt_for_default_toolchain` returns the resolved version that the user wants, which may be the input they typed or the default value * The result is stored in `toolchain_version_request` so it can be used during the internals bootstrapping --------- Co-authored-by: Charlie Marsh <[email protected]>
- Loading branch information