Skip to content

Commit

Permalink
Convert base_path to a string if it's a PathLike object
Browse files Browse the repository at this point in the history
  • Loading branch information
bitranox committed Oct 16, 2024
1 parent 78a5ee2 commit 79c3022
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion igittigitt/igittigitt.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,9 @@ def _expand_base_path(base_path: PathLikeOrString) -> pathlib.Path:
"""
expand the user directory and make absolute, but dont resolve symlinks
"""
path_base_dir = pathlib.Path(os.path.abspath(os.path.expanduser(base_path)))
# Convert base_path to a string if it's a PathLike object
base_path_str = os.fspath(base_path)
path_base_dir = pathlib.Path(os.path.abspath(os.path.expanduser(base_path_str)))
return path_base_dir

# parse_rule_files{{{
Expand Down

0 comments on commit 79c3022

Please sign in to comment.