Skip to content

Commit

Permalink
(sqlite) Removed use of Get-Item and update error message
Browse files Browse the repository at this point in the history
* Use of Get-Item is not permitted so updated to use full filenames
* Updated error message for grammatical correctness
  • Loading branch information
dgalbraith committed Jan 15, 2024
1 parent 7906bf4 commit c09437d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions automatic/sqlite/tools/chocolateyInstall.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ $toolsDir = Split-Path $MyInvocation.MyCommand.Definition

$packageArgs = @{
PackageName = 'sqlite'
FileFullPath = (Get-Item "$toolsDir\*dll*win-x86*.zip")
FileFullPath64 = (Get-Item "$toolsDir\*dll*win-x64*.zip")
FileFullPath = "$toolsDir\sqlite-dll-win-x86-3430200.zip"
FileFullPath64 = "$toolsDir\sqlite-dll-win-x64-3430200.zip"
Destination = $toolsDir
}
Get-ChildItem $toolsDir\* | Where-Object { $_.PSISContainer } | Remove-Item -Recurse -Force #remove older package dirs
Expand All @@ -14,10 +14,10 @@ Get-ChocolateyUnzip @packageArgs
$pp = Get-PackageParameters
if (!$pp.NoTools) {
if ((Get-OSArchitectureWidth -Compare 32) -or ($env:chocolateyForceX86 -eq 'true')) {
Write-Error -Message "32-bit version of sqlite tools not available after version 3.43.2" -Category ResourceUnavailable
Write-Error -Message "The 32-bit version of sqlite tools is not available after version 3.43.2" -Category ResourceUnavailable
}
Write-Host "Installing tools"
$packageArgs.FileFullPath64 = Get-Item "$toolsDir\*tools*win-x64*.zip"
$packageArgs.FileFullPath64 = "$toolsDir\sqlite-tools-win-x86-3430200.zip"
Get-ChocolateyUnzip @packageArgs
}

Expand Down

0 comments on commit c09437d

Please sign in to comment.