DEBUG:    2+  >>>> & $env:CAPTURE_SCRIPT

DEBUG:   16+  >>>> $ErrorActionPreference = "Stop"

DEBUG:   17+  >>>> [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

DEBUG:   19+  >>>> $repo = "pingdotgg/t3code"

DEBUG:   20+  >>>> $baseUrl = if ($env:T3CODE_RELEASE_BASE_URL) { $env:T3CODE_RELEASE_BASE_URL.TrimEnd("/") } else { "http://127.0.0.1:37285/$repo/releases/download" }

DEBUG:   20+ $baseUrl = if ( >>>> $env:T3CODE_RELEASE_BASE_URL) { $env:T3CODE_RELEASE_BASE_URL.TrimEnd("/") } else { "http://127.0.0.1:37285/$repo/releases/download" }

DEBUG:   20+ $baseUrl = if ($env:T3CODE_RELEASE_BASE_URL) {  >>>> $env:T3CODE_RELEASE_BASE_URL.TrimEnd("/") } else { "http://127.0.0.1:37285/$repo/releases/download" }

DEBUG:   21+  >>>> $t3Home = if ($env:T3CODE_HOME) { $env:T3CODE_HOME } else { Join-Path $HOME ".t3" }

DEBUG:   21+ $t3Home = if ( >>>> $env:T3CODE_HOME) { $env:T3CODE_HOME } else { Join-Path $HOME ".t3" }

DEBUG:   21+ $t3Home = if ($env:T3CODE_HOME) {  >>>> $env:T3CODE_HOME } else { Join-Path $HOME ".t3" }

DEBUG:   22+  >>>> $binDir = if ($env:T3CODE_INSTALL_BIN_DIR) { $env:T3CODE_INSTALL_BIN_DIR } else { Join-Path $HOME ".local\bin" }

DEBUG:   22+ $binDir = if ( >>>> $env:T3CODE_INSTALL_BIN_DIR) { $env:T3CODE_INSTALL_BIN_DIR } else { Join-Path $HOME ".local\bin" }

DEBUG:   22+ $binDir = if ($env:T3CODE_INSTALL_BIN_DIR) {  >>>> $env:T3CODE_INSTALL_BIN_DIR } else { Join-Path $HOME ".local\bin" }

DEBUG:   24+  >>>> $binDir = $ExecutionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath($binDir)

DEBUG:   31+  >>>> $terminal = -not [Console]::IsErrorRedirected -and $env:TERM -ne "dumb"

DEBUG:   32+  >>>> $interactive = $terminal -and $Host.UI.SupportsVirtualTerminal

DEBUG:   33+ if ( >>>> $interactive) {

DEBUG:   39+  >>>> $esc = [char]27

DEBUG:   40+  >>>> $reset = $bold = $muted = $accent = $green = ""

DEBUG:   40+ $reset =  >>>> $bold = $muted = $accent = $green = ""

DEBUG:   40+ $reset = $bold =  >>>> $muted = $accent = $green = ""

DEBUG:   40+ $reset = $bold = $muted =  >>>> $accent = $green = ""

DEBUG:   40+ $reset = $bold = $muted = $accent =  >>>> $green = ""

DEBUG:   41+ if ( >>>> $interactive -and -not $env:NO_COLOR) {

DEBUG:  120+  >>>> [Console]::Error.WriteLine("CAPTURE_DISPATCH terminal=$terminal interactive=$interactive mechanism=R encoding=$([Console]::Error.Encoding.WebName)")

DEBUG:  120+ [Console]::Error.WriteLine("CAPTURE_DISPATCH terminal=$terminal interactive=$interactive mechanism=R encoding=$( >>>> [Console]::Error.Encoding.WebName)")

CAPTURE_DISPATCH terminal=False interactive=False mechanism=R encoding=utf-8
DEBUG:  122+  >>>> $result = Invoke-Retrying { Invoke-RestMethod -Uri $env:CAPTURE_URL -Headers @{Accept="application/json"} }

DEBUG:   74+ function Invoke-Retrying([scriptblock] $request)  >>>> {

DEBUG:   75+   for ( >>>> $attempt = 1; ; $attempt++) {

DEBUG:   76+     try { return  >>>> & $request }

DEBUG:  122+ $result = Invoke-Retrying  >>>> { Invoke-RestMethod -Uri $env:CAPTURE_URL -Headers @{Accept="application/json"} }

DEBUG:  122+ $result = Invoke-Retrying {  >>>> Invoke-RestMethod -Uri $env:CAPTURE_URL -Headers @{Accept="application/json"} }

DEBUG:   77+     catch { if ( >>>> -not (Wait-Retry ([int]$_.Exception.Response.StatusCode) $attempt)) { throw } }

DEBUG:   69+ function Wait-Retry([int] $status, [int] $attempt)  >>>> {

DEBUG:   70+   if ( >>>> $attempt -ge 4 -or ($status -ge 400 -and $status -lt 500 -and $status -ne 408 -and $status -ne 429)) { return $false }

DEBUG:   71+    >>>> Start-Sleep -Seconds ([Math]::Pow(2, $attempt - 1))

DEBUG:   72+   return  >>>> $true

DEBUG:   73+  >>>> }

DEBUG:   75+   for ($attempt = 1; ;  >>>> $attempt++) {

DEBUG:   76+     try { return  >>>> & $request }

DEBUG:  122+ $result = Invoke-Retrying  >>>> { Invoke-RestMethod -Uri $env:CAPTURE_URL -Headers @{Accept="application/json"} }

DEBUG:  122+ $result = Invoke-Retrying {  >>>> Invoke-RestMethod -Uri $env:CAPTURE_URL -Headers @{Accept="application/json"} }

DEBUG:  122+ $result = Invoke-Retrying { Invoke-RestMethod -Uri $env:CAPTURE_URL -Headers @{Accept="application/json"}  >>>> }

DEBUG:   79+  >>>> }

DEBUG:  123+  >>>> $result | ConvertTo-Json -Depth 6

"d43b9967918839c5a0c2430f323403e5e95ebc6c2c104cb17350194e6c3bcb8c  t3-1.2.3-linux-x64.tar.gz\n88fb13f573da1e16bdd4fb92ce8fb60a9a118d59e2427edebc0f7bbf59cc3f8b  t3-1.2.3-win32-x64.zip\n"
DEBUG:  124+  >>>> Write-Output "CAPTURE_SUCCESS"

CAPTURE_SUCCESS
DEBUG:  131+ } finally {  >>>> [Console]::Error.WriteLine("CAPTURE_CALLER_FINALLY") }

CAPTURE_CALLER_FINALLY
