Skip to content

Commit 9a5f2fb

Browse files
bogurse1995Copilot
andcommitted
Fix Publish-BcContainerApp -sync failing on BC29 containers
Sync-NavApp was invoked with -WarningAction Ignore inside the container. In BC29 containers this throws "The value Ignore is not supported for an ActionPreference variable" under Windows PowerShell, because Ignore cannot be propagated as a preference variable into advanced functions (PowerShell/PowerShell#1759). Use SilentlyContinue instead, consistent with the rest of the module. Co-authored-by: Copilot <[email protected]>
1 parent 850952c commit 9a5f2fb

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

‎AppHandling/Publish-NavContainerApp.ps1‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ try {
361361
if ($sync) {
362362
Write-Host "Synchronizing $appName on tenant $tenant"
363363
Sync-NavTenant -ServerInstance $ServerInstance -Tenant $tenant -Force
364-
Sync-NavApp -ServerInstance $ServerInstance -Publisher $appPublisher -Name $appName -Version $appVersion -Tenant $tenant @syncArgs -force -WarningAction Ignore
364+
Sync-NavApp -ServerInstance $ServerInstance -Publisher $appPublisher -Name $appName -Version $appVersion -Tenant $tenant @syncArgs -force -WarningAction SilentlyContinue
365365
}
366366

367367
if($upgrade -and $install){

‎ReleaseNotes.txt‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
6.1.20
2+
Fix Publish-BcContainerApp -sync failing on BC29 containers with 'The value Ignore is not supported for an ActionPreference variable' (Sync-NavApp was invoked with -WarningAction Ignore, which Windows PowerShell rejects for advanced functions)
23

34
6.1.19
45
Add Parameter allowPrerelease to Publish-BcNuGetPackageToContainer

0 commit comments

Comments
 (0)