[?1h=DEBUG:    2+  >>>> & $env:CAPTURE_SCRIPT

DEBUG:    1+  >>>> $captureWriter=[IO.StreamWriter]::new([Console]::OpenStandardError(),[Text.Encoding]::ASCII)

DEBUG:    2+  >>>> $captureWriter.AutoFlush=$true

DEBUG:    3+  >>>> [Console]::SetError($captureWriter)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

DEBUG:   38+    >>>> $glyphs = -join [char[]](0x2588, 0x2580, 0x2584, 0x25A0, 0x00B7)

DEBUG:   39+    >>>> $encoding = [Console]::Error.Encoding

DEBUG:   40+    >>>> $interactive = $encoding.GetString($encoding.GetBytes($glyphs)) -eq $glyphs

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

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

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

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

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

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

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

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

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

CAPTURE_DISPATCH terminal=True interactive=False mechanism=W encoding=us-ascii
DEBUG:  125+  >>>> Fetch $env:CAPTURE_URL $env:CAPTURE_DEST -progress

DEBUG:   83+ function Fetch([string] $uri, [string] $destination, [switch] $progress)  >>>> {

DEBUG:   84+   if ( >>>> -not $progress -or -not $interactive) {

DEBUG:   85+      >>>> $ProgressPreference = if ($progress -and $terminal) { "Continue" } else { "SilentlyContinue" }

DEBUG:   85+     $ProgressPreference = if ( >>>> $progress -and $terminal) { "Continue" } else { "SilentlyContinue" }

DEBUG:   85+     $ProgressPreference = if ($progress -and $terminal) {  >>>> "Continue" } else { "SilentlyContinue" }

DEBUG:   86+      >>>> Invoke-Retrying { Invoke-WebRequest -Uri $uri -OutFile $destination -UseBasicParsing }

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

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

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

DEBUG:   86+     Invoke-Retrying  >>>> { Invoke-WebRequest -Uri $uri -OutFile $destination -UseBasicParsing }

DEBUG:   86+     Invoke-Retrying {  >>>> Invoke-WebRequest -Uri $uri -OutFile $destination -UseBasicParsing }

[6n[?25l[6n[33;1mReading web response stream [[7m[27mDownloaded: 0 Bytes of 19 Bytes                                                         ][0m[1;1H[?12l[?25h[1;1H                                                                                                                        [1;1HDEBUG:   80+     catch { if ( >>>> -not (Wait-Retry ([int]$_.Exception.Response.StatusCode) $attempt)) { throw } }

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

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

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

DEBUG:   75+   return  >>>> $true

DEBUG:   76+  >>>> }

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

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

DEBUG:   86+     Invoke-Retrying  >>>> { Invoke-WebRequest -Uri $uri -OutFile $destination -UseBasicParsing }

DEBUG:   86+     Invoke-Retrying {  >>>> Invoke-WebRequest -Uri $uri -OutFile $destination -UseBasicParsing }

DEBUG:   86+     Invoke-Retrying { Invoke-WebRequest -Uri $uri -OutFile $destination -UseBasicParsing  >>>> }

DEBUG:   82+  >>>> }

DEBUG:   87+      >>>> return

DEBUG:  122+  >>>> }

DEBUG:  126+  >>>> Write-Output "DEST_LENGTH=$((Get-Item $env:CAPTURE_DEST).Length)"

DEBUG:  126+ Write-Output "DEST_LENGTH=$( >>>> (Get-Item $env:CAPTURE_DEST).Length)"

DEST_LENGTH=262640
DEBUG:  127+  >>>> Write-Output "DEST_SHA256=$((Get-FileHash $env:CAPTURE_DEST -Algorithm SHA256).Hash)"

DEBUG:  127+ Write-Output "DEST_SHA256=$( >>>> (Get-FileHash $env:CAPTURE_DEST -Algorithm SHA256).Hash)"

DEST_SHA256=D43B9967918839C5A0C2430F323403E5E95EBC6C2C104CB17350194E6C3BCB8C
DEBUG:  128+  >>>> Write-Output "CAPTURE_SUCCESS"

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

CAPTURE_CALLER_FINALLY
