Evidence

References a release download URL path lines 1–22
1# Licensed under the MIT license
2# <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your
3# option. This file may not be copied, modified, or distributed
4# except according to those terms.
5
6<#
7.SYNOPSIS
8
9The installer for skref 1.2.0
10
11.DESCRIPTION
12
13This script detects what platform you're on and fetches an appropriate archive from
14https://github.com/alephic-ai/skref/releases/download/v1.2.0
15then unpacks the binaries and installs them to
16
17 $env:CARGO_HOME/bin (or $HOME/.cargo/bin)
18
19It will then add that dir to PATH by editing your Environment.Path registry key
20
21.PARAMETER NoModifyPath
22Don't add th …
HTTP URL string literal lines 47–55
47:68… eleases/download/v1.2.0")
48} else {
49 $ArtifactDownloadUrls = @("https://github.com/alephic-ai/skref/releases/download/v1.2.0")
50}
51
⋯4 lines
PowerShell script path introspection lines 84–94
84:6… ion Install-Binary($install_args) {
85 if ($Help) {
86 Get-Help $PSCommandPath -Detailed
87 Exit
88 }
⋯6 lines
PowerShell serializes objects as JSON lines 131–147
131:3… }
132 "aliases_json" = '{}'
133 }
134 }
135
136 $arch = Get-TargetTriple $platforms
137 if (-not $platforms.ContainsKey($arch)) {
138 $platforms_json = ConvertTo-Json $platforms
139 throw "ERROR: could not find binaries for this platform. Last platform tried: $arch platform info: $platforms_json"
140 }
141 Write-Information "downloading $app_name $app_version ($arch)"
142
143 $download_result = $false
144 $first_url = $true
145 foreach ($url in $ArtifactDownloadUrls) {
146 if (-not $first_url) {
147 Write-Information "trying alternative …
Binds Reflection.Assembly to a variable lines 190–196
190:90… 22H2.
191 # Ideally this would just be
192 # [System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture
193 # but that gets a type from the wrong assembly on Windows PowerShell (i.e. not Core)
194 $a = [System.Reflection.Assembly]::LoadWithPartialName("System.Runtime.InteropServices.RuntimeInformation")
195 $t = $a.GetType("System.Runtime.InteropServices.RuntimeInformation")
196 …

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.