Skip to content

Commit db40110

Browse files
authored
regressions (#3524)
Fixes #3522 Fixes #3523 Co-authored-by: freddydk <[email protected]>
1 parent c14e698 commit db40110

File tree

4 files changed

+18
-2
lines changed

4 files changed

+18
-2
lines changed

AppHandling/Compile-AppInNavContainer.ps1

+1-1
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@ try {
499499
if (Test-Path -Path $symbolsFile) {
500500
$addDependencies = Invoke-ScriptInBcContainer -containerName $containerName -ScriptBlock { Param($symbolsFile, $platformversion)
501501
# Wait for file to be accessible in container
502-
While (-not (Test-Path $symbolsFile)) { Start-Sleep -Seconds 1 }
502+
While (-not (Test-Path $symbolsFile)) { Start-Sleep -Milliseconds 100 }
503503

504504
if ($platformversion.Major -ge 15) {
505505
Add-Type -AssemblyName System.IO.Compression.FileSystem

ContainerHandling/New-NavContainer.ps1

+12
Original file line numberDiff line numberDiff line change
@@ -1794,6 +1794,18 @@ if (!(dotnet --list-runtimes | Where-Object { $_ -like "Microsoft.NetCore.App 1.
17941794
') | Add-Content -Path "$myfolder\HelperFunctions.ps1"
17951795
}
17961796

1797+
if ($genericTag -lt [System.Version]"1.0.2.21") {
1798+
@'
1799+
# Patch Microsoft.PowerShell.Archive to use en-US UI Culture (see https://github.com/PowerShell/Microsoft.PowerShell.Archive/pull/46)
1800+
$psarchiveModule = 'C:\Windows\System32\WindowsPowerShell\v1.0\Modules\Microsoft.PowerShell.Archive\Microsoft.PowerShell.Archive.psm1'
1801+
if (Test-Path $psarchiveModule) {
1802+
$rule = New-Object System.Security.AccessControl.FileSystemAccessRule((whoami),'Modify', 'Allow')
1803+
$acl = Get-Acl -Path $psarchiveModule; $acl.AddAccessRule($rule); Set-Acl -Path $psarchiveModule -AclObject $acl
1804+
Set-Content -encoding utf8 -path $psarchiveModule -value (Get-Content -encoding utf8 -raw -path $psarchiveModule).Replace("`r`nImport-LocalizedData LocalizedData -filename ArchiveResources`r`n","`r`nImport-LocalizedData LocalizedData -filename ArchiveResources -UICulture 'en-US'`r`n")
1805+
}
1806+
'@ | Add-Content -Path "$myfolder\SetupVariables.ps1"
1807+
}
1808+
17971809
if ($updateHosts) {
17981810
Copy-Item -Path (Join-Path $PSScriptRoot "updatehosts.ps1") -Destination (Join-Path $myfolder "updatehosts.ps1") -Force
17991811
$parameters += "--volume ""c:\windows\system32\drivers\etc:C:\driversetc"""

Misc/Copy-FileToNavContainer.ps1

+1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ try {
3535
try {
3636
Copy-Item -Path $localPath -Destination $tempFile
3737
Invoke-ScriptInBcContainer -containerName $containerName -scriptblock { Param($tempFile, $containerPath)
38+
While (-not (Test-Path $tempFile)) { Start-Sleep -Milliseconds 100 }
3839
if (Test-Path $containerPath -PathType Container) {
3940
throw "ContainerPath ($containerPath) already exists as a folder. Cannot copy file, ContainerPath needs to specify a filename."
4041
}

ReleaseNotes.txt

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
6.0.17
2-
2+
Issue 3518 If WinRm is not running on the host, a container couldn't be created
3+
Issue 3519 New-BcContainer fails due to password complexity on some computers
4+
Issue 3522 The 'Expand-Archive' command was found in the module 'Microsoft.PowerShell.Archive',...
5+
Issue 3523 Copy-FileToBcContainer fails for BcContainerHelper 6.0.16 (added resilience)
36

47
6.0.16
58
Issue 3477 Regression: Error: App filenames must be unique

0 commit comments

Comments
 (0)