fixed issue on space in solution name

This commit is contained in:
v-amolpatil 2023-03-01 17:16:39 +05:30
Родитель 830230a5a5
Коммит 412e0667ec
1 изменённых файлов: 10 добавлений и 12 удалений

22
.github/workflows/arm-ttk-validations.yaml поставляемый
Просмотреть файл

@ -41,20 +41,18 @@ jobs:
{
$hasCreateUiDefinitionTemplateChanged = $true
}
$filePaths = $filteredFiles -split ' '
if ($null -ne $filePaths[0])
if ($filteredFiles.Count -eq 1)
{
$solutionNameWithOtherPath = $filePaths[0].SubString(10)
if ($solutionNameWithOtherPath -ne '' -and $solutionNameWithOtherPath -ne $null)
{
$headers = $solutionNameWithOtherPath -split '/', 3
if ($null -ne $headers[0])
{
$sName = $headers[0]
}
}
$packageIndex = $filteredFiles.IndexOf("/Package")
$sName = $filteredFiles.SubString(10, $packageIndex - 10)
}
else
{
$packageIndex = $filteredFiles[0].IndexOf("/Package")
$sName = $filteredFiles[0].SubString(10, $packageIndex - 10)
}
Write-Host "SolutionName: $sName"
}
Write-Output "::set-output name=solutionName::$sName"