Skip to content
Merged
Changes from 1 commit
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
12 changes: 11 additions & 1 deletion lib/install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@ function Start-Download ($url, $to, $cookies) {
Invoke-Download $url $to $cookies $progress
} catch {
$e = $_.exception
if ($e.Response.StatusCode -eq 'Unauthorized') {
warn "Token might be misconfigured."
}
if($e.innerexception) { $e = $e.innerexception }
throw $e
}
Expand Down Expand Up @@ -246,7 +249,14 @@ function Invoke-CachedAria2Download ($app, $version, $manifest, $architecture, $
} else {
$download_finished = $false
# create aria2 input file content
$urlstxt_content += "$(handle_special_urls $url)`n"
try {
$try_url = handle_special_urls $url
} catch {
if ($_.Exception.Response.StatusCode -eq 'Unauthorized') {
warn "Token might be misconfigured."
}
}
$urlstxt_content += "$try_url`n"
if (!$url.Contains('sourceforge.net')) {
$urlstxt_content += " referer=$(strip_filename $url)`n"
}
Expand Down