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(bin_name: str, dir_name: str, path: Optional[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.

Type

Optional[str]

env_dir_name

Name of the directory within the users home directory where binary versions will be stored.

Type

str

path

The current working directory.

Type

Path

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

property command_suffix

Return command suffix based on platform.system.

property env_dir

Return the directory used to store version binaries.

property 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.