Skip to content

Commit

Permalink
regressions (#3524)
Browse files Browse the repository at this point in the history
Fixes #3522
Fixes #3523

Co-authored-by: freddydk <freddydk@users.noreply.github.com>
  • Loading branch information
freddydk and freddydk committed Apr 29, 2024
1 parent c14e698 commit db40110
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 2 deletions.
2 changes: 1 addition & 1 deletion AppHandling/Compile-AppInNavContainer.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ try {
if (Test-Path -Path $symbolsFile) {
$addDependencies = Invoke-ScriptInBcContainer -containerName $containerName -ScriptBlock { Param($symbolsFile, $platformversion)
# Wait for file to be accessible in container
While (-not (Test-Path $symbolsFile)) { Start-Sleep -Seconds 1 }
While (-not (Test-Path $symbolsFile)) { Start-Sleep -Milliseconds 100 }

if ($platformversion.Major -ge 15) {
Add-Type -AssemblyName System.IO.Compression.FileSystem
Expand Down
12 changes: 12 additions & 0 deletions ContainerHandling/New-NavContainer.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -1794,6 +1794,18 @@ if (!(dotnet --list-runtimes | Where-Object { $_ -like "Microsoft.NetCore.App 1.
') | Add-Content -Path "$myfolder\HelperFunctions.ps1"
}

if ($genericTag -lt [System.Version]"1.0.2.21") {
@'
# Patch Microsoft.PowerShell.Archive to use en-US UI Culture (see https://github.com/PowerShell/Microsoft.PowerShell.Archive/pull/46)
$psarchiveModule = 'C:\Windows\System32\WindowsPowerShell\v1.0\Modules\Microsoft.PowerShell.Archive\Microsoft.PowerShell.Archive.psm1'
if (Test-Path $psarchiveModule) {
$rule = New-Object System.Security.AccessControl.FileSystemAccessRule((whoami),'Modify', 'Allow')
$acl = Get-Acl -Path $psarchiveModule; $acl.AddAccessRule($rule); Set-Acl -Path $psarchiveModule -AclObject $acl
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")
}
'@ | Add-Content -Path "$myfolder\SetupVariables.ps1"
}

if ($updateHosts) {
Copy-Item -Path (Join-Path $PSScriptRoot "updatehosts.ps1") -Destination (Join-Path $myfolder "updatehosts.ps1") -Force
$parameters += "--volume ""c:\windows\system32\drivers\etc:C:\driversetc"""
Expand Down
1 change: 1 addition & 0 deletions Misc/Copy-FileToNavContainer.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ try {
try {
Copy-Item -Path $localPath -Destination $tempFile
Invoke-ScriptInBcContainer -containerName $containerName -scriptblock { Param($tempFile, $containerPath)
While (-not (Test-Path $tempFile)) { Start-Sleep -Milliseconds 100 }
if (Test-Path $containerPath -PathType Container) {
throw "ContainerPath ($containerPath) already exists as a folder. Cannot copy file, ContainerPath needs to specify a filename."
}
Expand Down
5 changes: 4 additions & 1 deletion ReleaseNotes.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
6.0.17

Issue 3518 If WinRm is not running on the host, a container couldn't be created
Issue 3519 New-BcContainer fails due to password complexity on some computers
Issue 3522 The 'Expand-Archive' command was found in the module 'Microsoft.PowerShell.Archive',...
Issue 3523 Copy-FileToBcContainer fails for BcContainerHelper 6.0.16 (added resilience)

6.0.16
Issue 3477 Regression: Error: App filenames must be unique
Expand Down

0 comments on commit db40110

Please sign in to comment.