Ensure path for finding root is absolute (#1550)
As Path.resolve() is buggy on windows (see https://bugs.python.org/issue38671) an absolute path is ensured by prepending the Path.cwd()
This commit is contained in:
parent
8d036ceb3f
commit
98ac69f04c
@ -5834,7 +5834,7 @@ def find_project_root(srcs: Iterable[str]) -> Path:
|
|||||||
if not srcs:
|
if not srcs:
|
||||||
return Path("/").resolve()
|
return Path("/").resolve()
|
||||||
|
|
||||||
path_srcs = [Path(src).resolve() for src in srcs]
|
path_srcs = [Path(Path.cwd(), src).resolve() for src in srcs]
|
||||||
|
|
||||||
# A list of lists of parents for each 'src'. 'src' is included as a
|
# A list of lists of parents for each 'src'. 'src' is included as a
|
||||||
# "parent" of itself if it is a directory
|
# "parent" of itself if it is a directory
|
||||||
|
Loading…
Reference in New Issue
Block a user