runway.env_mgr package
Base module for environment managers.
- runway.env_mgr.handle_bin_download_error(exc: URLError, name: str) None [source]
Give user info about their failed download.
- Raises
SystemExit – Always raised after logging reason.
- class runway.env_mgr.EnvManager[source]
Bases:
runway.mixins.DelCachedPropMixin
Base environment manager class.
- binPath to the binary of the current version.
- env_dir_name
Name of the directory within the users home directory where binary versions will be stored.
- Type
- path
The current working directory.
- Type
- __init__(bin_name: str, dir_name: str, path: Optional[pathlib.Path] = None) None [source]
Initialize class.
- Parameters
bin_name – Name of the binary file (e.g. kubectl)
dir_name – Name of the directory within the users home directory where binary versions will be stored.
path – The current working directory.
- property bin: pathlib.Path
Path to the version binary.
- Returns
Path
- property env_dir: pathlib.Path
Return the directory used to store version binaries.
- property versions_dir: pathlib.Path
Return the directory used to store binary.
When first used, the existence of the directory is checked and it is created if needed.
- __new__(**kwargs)
- property version_file: Optional[pathlib.Path]
Find and return a “<bin version file>” file if one is present.
- Returns
Path to the <bin> version file.