Skip to content

Commit

Permalink
fix: more verbose assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
danielbraun89 authored Apr 12, 2023
1 parent 04be697 commit c9e29bf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion nanolayer/installers/gh_release/gh_release_installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,9 @@ def resolve_and_validate_dir(
if isinstance(dir_location, str):
dir_location = Path(dir_location)

assert dir_location.is_dir()
assert not dir_location.is_file(), f"{dir_location} should be a folder - got file"

dir_location.mkdir(parents=True, exists_ok=True)

return dir_location

Expand Down

0 comments on commit c9e29bf

Please sign in to comment.