Use Path.Combine for create directory (#6630)

Path.Combine will allow for fully qualified paths to override the combination. For example `Path.Combine("a","b","c:\test")` will resolve to `c:\test'. We have depended on such behavior in a few places like d66b5160f2/eng/pipelines/templates/steps/smoke-test-steps.yml (L99) so I'm reverting back to Path.Combine.

Co-authored-by: Wes Haggard <weshaggard@users.noreply.github.com>
This commit is contained in:
Azure SDK Bot 2025-06-18 08:59:02 -07:00 committed by GitHub
parent c40e4e94fe
commit 6a71677c9e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -163,7 +163,7 @@ try {
$root = $repositoryRoot = "$PSScriptRoot/../../.." | Resolve-Path
if($ServiceDirectory) {
$root = "$repositoryRoot/sdk/$ServiceDirectory" | Resolve-Path
$root = [System.IO.Path]::Combine($repositoryRoot, "sdk", $ServiceDirectory) | Resolve-Path
}
if ($TestResourcesDirectory) {