Skip to content

Commit 6dc633f

Browse files
committed
Move ref param initialization before loop
1 parent d7877bf commit 6dc633f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Actions/IncrementVersionNumber/IncrementVersionNumber.psm1

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -200,14 +200,15 @@ function Set-VersionInAppManifests($projectPath, $projectSettings, $newValue, [r
200200
$newValue = $projectSettings.repoVersion
201201
}
202202

203+
if (-not $updatedAppFolders.Value) {
204+
$updatedAppFolders.Value = @()
205+
}
206+
203207
$allAppFolders = @($projectSettings.appFolders) + @($projectSettings.testFolders) + @($projectSettings.bcptTestFolders)
204208
# Set version in app.json files
205209
$allAppFolders | ForEach-Object {
206210
$appFolder = Join-Path $projectPath $_ -Resolve
207211

208-
if (-not $updatedAppFolders.Value) {
209-
$updatedAppFolders.Value = @()
210-
}
211212
# Update the app only if it's not already updated
212213
if (-not ($updatedAppFolders.Value -contains $appFolder)) {
213214
$appJson = Join-Path $appFolder "app.json"

0 commit comments

Comments
 (0)