Skip to content

Commit

Permalink
fix connector path
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronsteers committed Mar 18, 2024
1 parent b2f014d commit 9500220
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions airbyte/_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from platform import system
from shutil import rmtree
from typing import IO, TYPE_CHECKING, Any, NoReturn, cast
from typing_extensions import Literal

from rich import print

Expand All @@ -24,9 +25,13 @@
_LATEST_VERSION = "latest"


def _is_windows() -> bool:
return system().lower() == "windows"


def _get_bin_dir(venv_path: Path, /) -> Path:
"""Get the directory where executables are installed."""
if system().lower() == "windows":
if _is_windows():
return venv_path / "Scripts"

return venv_path / "bin"
Expand Down Expand Up @@ -173,7 +178,8 @@ def _get_venv_path(self) -> Path:
return self.install_root / self._get_venv_name()

def _get_connector_path(self) -> Path:
return _get_bin_dir(self._get_venv_path()) / self.name
suffix: Literal[".exe", ""] = ".exe" if _is_windows() else ""
return _get_bin_dir(self._get_venv_path()) / (self.name + suffix)

def _run_subprocess_and_raise_on_failure(self, args: list[str]) -> None:
result = subprocess.run(
Expand Down

0 comments on commit 9500220

Please sign in to comment.