Skip to content

Commit 46935e3

Browse files
azure-sdkbenbp
andauthored
Handle multiple segments in service directory path (Azure#24521)
Co-authored-by: Ben Broderick Phillips <[email protected]>
1 parent e79701c commit 46935e3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

eng/common/TestResources/New-TestResources.ps1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -329,9 +329,9 @@ try {
329329
$sp.Id
330330
}
331331

332-
# If the ServiceDirectory is an absolute path use the last directory name
333-
# (e.g. D:\foo\bar\ -> bar)
334-
$serviceName = if (Split-Path -IsAbsolute $ServiceDirectory) {
332+
# If the ServiceDirectory has multiple segments use the last directory name
333+
# e.g. D:\foo\bar -> bar or foo/bar -> bar
334+
$serviceName = if (Split-Path $ServiceDirectory) {
335335
Split-Path -Leaf $ServiceDirectory
336336
} else {
337337
$ServiceDirectory
@@ -916,4 +916,4 @@ Run this in an Azure DevOps CI (with approrpiate variables configured) before
916916
executing live tests. The script will output variables as secrets (to enable
917917
log redaction).
918918
919-
#>
919+
#>

0 commit comments

Comments
 (0)