Skip to content

Commit b541958

Browse files
Expand-AzTemplate: Fixing CreateUIDefinition casing (#599) (#625)
Co-authored-by: James Brundage <@github.com>
1 parent 583eeba commit b541958

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

arm-ttk/Expand-AzTemplate.ps1

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,11 @@ function Expand-AzTemplate
199199
$templateFile = $TemplateText = $templateObject = $TemplateFullPath = $templateFileName = $null
200200
} else {
201201
#*$CreateUIDefinitionFullPath (the path to CreateUIDefinition.json)
202-
$createUiDefinitionFullPath = Join-Path -childPath 'createUiDefinition.json' -Path $templateFolder
203-
if (Test-Path $createUiDefinitionFullPath) {
202+
$createUiDefinitionFullPath =
203+
Get-ChildItem -Path $templateFolder |
204+
Where-Object Name -eq 'createUiDefinition.json' |
205+
Select-Object -ExpandProperty FullName
206+
if ($createUiDefinitionFullPath -and (Test-Path $createUiDefinitionFullPath)) {
204207
#*$CreateUIDefinitionText (the text contents of CreateUIDefinition.json)
205208
$createUIDefinitionText = [IO.File]::ReadAllText($createUiDefinitionFullPath)
206209
#*$CreateUIDefinitionObject (the createuidefinition text, converted from json)

0 commit comments

Comments
 (0)