Skip to content

Commit

Permalink
Accept pathlib.Path in sh_{prepend|append}_paths
Browse files Browse the repository at this point in the history
  • Loading branch information
elprans committed Oct 16, 2024
1 parent 875557e commit 64ec7a7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions metapkg/targets/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -2105,12 +2105,12 @@ def sh_append_paths(
self,
args: dict[str, str | pathlib.Path | None],
key: str,
paths: list[str] | tuple[str, ...],
paths: list[str | pathlib.Path] | tuple[str | pathlib.Path, ...],
*,
sep: str = os.pathsep,
ignore_env: bool = False,
) -> None:
new_paths = self.sh_quote_flags(paths)
new_paths = self.sh_quote_flags([str(p) for p in paths])
self.sh_append_quoted_paths(
args, key, new_paths, sep=sep, ignore_env=ignore_env
)
Expand All @@ -2133,12 +2133,12 @@ def sh_prepend_paths(
self,
args: dict[str, str | pathlib.Path | None],
key: str,
paths: list[str] | tuple[str, ...],
paths: list[str | pathlib.Path] | tuple[str | pathlib.Path, ...],
*,
sep: str = os.pathsep,
ignore_env: bool = False,
) -> None:
new_paths = self.sh_quote_flags(paths)
new_paths = self.sh_quote_flags([str(p) for p in paths])
self.sh_prepend_quoted_paths(
args, key, new_paths, sep=sep, ignore_env=ignore_env
)
Expand Down

0 comments on commit 64ec7a7

Please sign in to comment.