runway.env_mgr package¶
Base module for environment managers.
-
class
runway.env_mgr.
EnvManager
(bin_name: str, dir_name: str, path: Optional[pathlib.Path] = None)[source]¶ Bases:
object
Base environment manager class.
-
binPath to the binary of the current version.
-
current_version
¶ The current binary version being used.
-
env_dir_name
¶ Name of the directory within the users home directory where binary versions will be stored.
-
path
¶ The current working directory.
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
¶ Path to the version binary.
- Returns
Path
-
command_suffix
¶ Return command suffix based on platform.system.
-
env_dir
¶ Return the directory used to store version binaries.
-
path
: pathlib.Path¶
-
versions_dir
¶ Return the directory used to store binary.
When first used, the existence of the directory is checked and it is created if needed.
-
-
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.