Skip to content

Commit

Permalink
Handle multiple segments in service directory path (Azure#18015)
Browse files Browse the repository at this point in the history
Co-authored-by: Ben Broderick Phillips <[email protected]>
azure-sdk and benbp authored Oct 5, 2021

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent b1a914e commit 7154ded
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions eng/common/TestResources/New-TestResources.ps1
Original file line number Diff line number Diff line change
@@ -329,9 +329,9 @@ try {
$sp.Id
}

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

0 comments on commit 7154ded

Please sign in to comment.