Skip to content

Commit

Permalink
(inkscape) Disable package update
Browse files Browse the repository at this point in the history
The 32bit installer is missing from the latest version of InkScape, and
the error that is thrown is currently preventing our update gist to be
updated properly.

As such we throw a minimized error message to continue allowing the gist
to be updated, as well as preventing an update until a decision has been
made of whether 32bit support will be dropped or not.
  • Loading branch information
AdmiringWorm committed Oct 25, 2024
1 parent 6a83c37 commit b5d2c5e
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions automatic/inkscape/update.ps1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Import-Module Chocolatey-AU
Import-Module Chocolatey-AU
Import-Module "$PSScriptRoot\..\..\scripts\au_extensions.psm1"

$domain = 'https://inkscape.org'
Expand Down Expand Up @@ -31,12 +31,22 @@ function global:au_SearchReplace {
}

function global:au_GetLatest {
$redirUrl = Get-RedirectedUrl "$domain/en/release/"
# We know the 32bit executable is currently missing, as such
# we will prevent package update for this package until it has
# been decided whether 32bit support will be dropped or not.
throw "Updating of inkscape is disabled until it has been decided whether 32bit support will be dropped or not."

$redirUrl = Get-RedirectedUrl "$domain/release/"

$version = $redirUrl -split '\/(inkscape-)?' | Select-Object -last 1 -skip 1

$32bit_page = Invoke-WebRequest "$redirUrl/windows/32-bit/msi/dl/" -UseBasicParsing
$64bit_page = Invoke-WebRequest "$redirUrl/windows/64-bit/msi/dl/" -UseBasicParsing
try {
$32bit_page = Invoke-WebRequest "$redirUrl/windows/32-bit/msi/dl/" -UseBasicParsing
$64bit_page = Invoke-WebRequest "$redirUrl/windows/64-bit/msi/dl/" -UseBasicParsing
}
catch {
throw "Failed to download 32bit or 64bit executeble. Throwing minimized error to allow gist to be updated."
}

$re = '\.msi$'
$url32 = $32bit_page.links | Where-Object href -match $re | Select-Object -first 1 -expand href | ForEach-Object { $domain + $_ }
Expand Down

0 comments on commit b5d2c5e

Please sign in to comment.