Skip to content

Commit

Permalink
fix: v2 API conditional (#84)
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonjgardner authored Feb 28, 2024
2 parents 71737d9 + e2aea35 commit 61c3409
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion v2/installer.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ function Get-ApiPacks() {

$API_JSON = "$BRTX_DIR\packs\api.json"

if (Test-Path $API_JSON && (Get-Item $API_JSON).LastWriteTime -gt (Get-Date).AddHours(-1)) {
if ((Test-Path $API_JSON) -and ((Get-Item $API_JSON).LastWriteTime -gt (Get-Date).AddHours(-1))) {
return (Get-Content $API_JSON -Raw | ConvertFrom-Json)
}

Expand Down

0 comments on commit 61c3409

Please sign in to comment.