Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 14 additions & 15 deletions DockerMsftProvider.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -1469,24 +1469,23 @@ function DownloadPackageHelper

if((-not $hashCheck))
{
Write-Error -Message "Cannot verify the file SHA256. Deleting the file."
$null = remove-item -Path $fullDestinationPath -Force
Write-Error -Message "Cannot verify the file SHA256. Deleting the file."
}
else {
Write-Verbose "Hash verified!"
$savedWindowsPackageItem = Microsoft.PowerShell.Utility\New-Object PSCustomObject -Property ([ordered]@{
SourceName = $source
Name = $name
Version = $version
Description = $description
Date = $date
URL = $originPath
Size = $size
sha256 = $sha })

Write-Verbose "Hash verified!"

$savedWindowsPackageItem = Microsoft.PowerShell.Utility\New-Object PSCustomObject -Property ([ordered]@{
SourceName = $source
Name = $name
Version = $version
Description = $description
Date = $date
URL = $originPath
Size = $size
sha256 = $sha
})

Write-Output (New-SoftwareIdentityFromDockerInfo $savedWindowsPackageItem)
Write-Output (New-SoftwareIdentityFromDockerInfo $savedWindowsPackageItem)
}
}

function GenerateFullPath
Expand Down