Handle multiple segments in service directory path (#2943)
Co-authored-by: Ben Broderick Phillips <bebroder@microsoft.com>
This commit is contained in:
parent
6044c63ad1
commit
e5f190c7a5
@ -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).
|
||||
|
||||
#>
|
||||
#>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user