Skip to content

Commit

Permalink
fix ps5 issue in Push-BcNuGetPackage (#3769)
Browse files Browse the repository at this point in the history
Co-authored-by: freddydk <[email protected]>
  • Loading branch information
freddydk and freddydk authored Nov 27, 2024
1 parent 0f49ca8 commit 922b356
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
9 changes: 5 additions & 4 deletions NuGet/NuGetFeedClass.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -357,11 +357,12 @@ class NuGetFeed {
$LF = "`r`n";
$tmpFile = Join-Path ([System.IO.Path]::GetTempPath()) ([GUID]::NewGuid().ToString())
$fs = [System.IO.File]::OpenWrite($tmpFile)
$fs | Add-Member -MemberType ScriptMethod -Name WriteBytes -Value { param($bytes) $this.Write($bytes, 0, $bytes.Length) }
try {
$fs.Write([System.Text.Encoding]::UTF8.GetBytes("--$boundary$LF"))
$fs.Write([System.Text.Encoding]::UTF8.GetBytes("Content-Type: application/octet-stream$($LF)Content-Disposition: form-data; name=package; filename=""$([System.IO.Path]::GetFileName($package))""$($LF)$($LF)"))
$fs.Write([System.IO.File]::ReadAllBytes($package))
$fs.Write([System.Text.Encoding]::UTF8.GetBytes("$LF--$boundary--$LF"))
$fs.WriteBytes([System.Text.Encoding]::UTF8.GetBytes("--$boundary$LF"))
$fs.WriteBytes([System.Text.Encoding]::UTF8.GetBytes("Content-Type: application/octet-stream$($LF)Content-Disposition: form-data; name=package; filename=""$([System.IO.Path]::GetFileName($package))""$($LF)$($LF)"))
$fs.WriteBytes([System.IO.File]::ReadAllBytes($package))
$fs.WriteBytes([System.Text.Encoding]::UTF8.GetBytes("$LF--$boundary--$LF"))
} finally {
$fs.Close()
}
Expand Down
1 change: 1 addition & 0 deletions ReleaseNotes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Issue 3762 Give Option to Choose SQL PowerShell Module When Restoring From BacPac
There are instances where sqlps does not work as expected when it is installed. This change adds a switch parameter, useSqlServerModule, to Restore-BcDatabaseFromArtifacts, New-NavContainer, and the BcContainerHelper config file.
Issue 1303 from AL-Go repository - renew federated token when access token needs renewal (works only for GitHub at this time)
Regression when from PR 3760 - Push-BcNuGetPackage doesn't work on PowerSHell 5

6.0.29
Issue 3591 When using Publish-NAVApp to publish an app, which fails compilation in the service, the command might hang forever - the fix for this is a temporary hack put in place for the versions which doesn't work.
Expand Down

0 comments on commit 922b356

Please sign in to comment.