Skip to content

Commit ff01700

Browse files
authored
Merge pull request #2 from brooklyn-data/fix/missing-versions-dir
v1.1.1 to fix error when `~/.dbt/versions` directory doesn't exist yet.
2 parents fa45b8a + 88cd1fa commit ff01700

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

CHANGELOG.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,23 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8-
## [Unreleased](https://github.com/brooklyn-data/dbtenv/compare/v1.1.0...HEAD)
8+
## [Unreleased](https://github.com/brooklyn-data/dbtenv/compare/v1.1.1...HEAD)
99

1010
### Added
1111

1212
### Changed
1313

14+
## [1.1.1](https://github.com/brooklyn-data/dbtenv/compare/v1.1.0...v1.1.1) - 2021-07-15
15+
16+
### Fixed
17+
- Fix error when `~/.dbt/versions` directory doesn't exist yet.
18+
1419
## [1.1.0](https://github.com/brooklyn-data/dbtenv/compare/v1.0.0...v1.1.0) - 2021-07-14
1520

1621
### Added
17-
1822
- Support installation of dbt versions >= 0.20.0 in a Python 3.9 environment.
1923

2024
## [1.0.0](https://github.com/brooklyn-data/dbtenv/releases/tag/v1.0.0) - 2021-04-16
2125

2226
### Added
23-
2427
- Initial release

dbtenv/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
from typing import Any, List, Optional
1515

1616

17-
__version__ = '1.1.0'
17+
__version__ = '1.1.1'
1818

1919
VENVS_DIRECTORY = os.path.normpath('~/.dbt/versions')
2020

dbtenv/pip.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020

2121

2222
def get_installed_pip_dbt_versions(env: Environment) -> List[Version]:
23+
if not os.path.isdir(env.venvs_directory):
24+
return []
2325
with os.scandir(env.venvs_directory) as venvs_dir_scan:
2426
possible_versions = (Version(entry.name) for entry in venvs_dir_scan if entry.is_dir())
2527
return [version for version in possible_versions if PipDbt(env, version).is_installed()]

0 commit comments

Comments
 (0)