def __init__()

in src/artifacts_keyring/plugin.py [0:0]


    def __init__(self):
        if sys.platform.startswith("win"):
            tool_path = os.path.join(
                os.path.dirname(os.path.abspath(__file__)),
                "plugins",
                "plugins",
                "netfx",
                "CredentialProvider.Microsoft",
                "CredentialProvider.Microsoft.exe",
            )
            self.exe = [tool_path]
        else:
            try:
                sys_version = tuple(int(i) for i in
                    subprocess.check_output(["dotnet", "--version"]).decode().strip().partition("-")[0].split("."))
                get_runtime_path = lambda: "dotnet"
            except Exception as e:
                message = (
                    "Unable to find dependency dotnet, please manually install"
                    " the .NET Core runtime and ensure 'dotnet' is in your PATH. Error: "
                )
                raise Exception(message + str(e))

            tool_path = os.path.join(
                os.path.dirname(os.path.abspath(__file__)),
                "plugins",
                "plugins",
                "netcore",
                "CredentialProvider.Microsoft",
                "CredentialProvider.Microsoft.dll",
            )
            self.exe = [get_runtime_path(), "exec", tool_path]

        if not os.path.exists(tool_path):
            raise RuntimeError("Unable to find credential provider in the expected path: " + tool_path)