modify documents
This commit is contained in:
@@ -13,12 +13,14 @@ from .base import AdapterError
|
||||
|
||||
|
||||
def _test_argv(root: Path, command: tuple[str, ...]) -> tuple[str, ...]:
|
||||
if "/" not in command[0] and "\\" not in command[0]:
|
||||
return command
|
||||
first = Path(command[0].replace("\\", "/"))
|
||||
executable = first if first.is_absolute() else (root / first).resolve()
|
||||
if first.is_absolute():
|
||||
raise AdapterError(
|
||||
"msbuild.testCommand executable must be repository-relative"
|
||||
)
|
||||
executable = (root / first).resolve()
|
||||
try:
|
||||
executable.relative_to(root)
|
||||
executable.relative_to(root.resolve())
|
||||
except ValueError as exc:
|
||||
raise AdapterError(
|
||||
"msbuild.testCommand resolves outside the repository"
|
||||
|
||||
Reference in New Issue
Block a user