Skip to content

Commit

Permalink
Add github api token to au_GetLatest
Browse files Browse the repository at this point in the history
  • Loading branch information
atruskie committed Apr 7, 2020
1 parent 399973e commit 6118fe6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions automatic/rclone.portable/update.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function global:au_BeforeUpdate {
}

function global:au_GetLatest {
$releases = Invoke-RestMethod $github_releases
$releases = Invoke-RestMethod $github_releases -Headers @{Authorization="token ${Env:github_api_key}"}

$386 = $releases[0].assets | Where-Object { $_.name -ilike "*windows-386*" }
$amd64 = $releases[0].assets | Where-Object { $_.name -ilike "*windows-amd64*" }
Expand Down Expand Up @@ -54,4 +54,4 @@ function global:au_GetLatest {

if ($MyInvocation.InvocationName -ne '.') { # run the update only if script is not sourced
update -ChecksumFor none
}
}

0 comments on commit 6118fe6

Please sign in to comment.