Skip to content

Commit

Permalink
Gracefully abort when dbt versions >= 1.0.0 attempted to install thro…
Browse files Browse the repository at this point in the history
…ugh Homebrew
  • Loading branch information
NiallRees committed Dec 4, 2021
1 parent e9119a7 commit a85dde2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions dbtenv/homebrew.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ def __init__(self, env: Environment, version: Version) -> None:
self._executable: Optional[str] = None

def install(self, force: bool = False) -> None:
if self.version >= Version('1.0.0'):
raise DbtenvError(
"dbtenv does not support installing dbt versions greater than or equal to 1.0.0 through Homebrew. Configure dbtenv to use pip instead.")

if self.is_installed():
if force:
logger.info(f"dbt {self.version.homebrew_version} is already installed with Homebrew but will be reinstalled.")
Expand Down

0 comments on commit a85dde2

Please sign in to comment.