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 fastpaper-cli 0.9.1
10
11.DESCRIPTION
12
13This script detects what platform you're on and fetches an appropriate archive from
14https://github.com/zhangyee/fastpaper-cli/releases/download/v0.9.1
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:74… eleases/download/v0.9.1")
48} else {
49 $ArtifactDownloadUrls = @("https://github.com/zhangyee/fastpaper-cli/releases/download/v0.9.1")
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 121–137
121:3… }
122 "aliases_json" = '{}'
123 }
124 }
125
126 $arch = Get-TargetTriple $platforms
127 if (-not $platforms.ContainsKey($arch)) {
128 $platforms_json = ConvertTo-Json $platforms
129 throw "ERROR: could not find binaries for this platform. Last platform tried: $arch platform info: $platforms_json"
130 }
131 Write-Information "downloading $app_name $app_version ($arch)"
132
133 $download_result = $false
134 $first_url = $true
135 foreach ($url in $ArtifactDownloadUrls) {
136 if (-not $first_url) {
137 Write-Information "trying alternative …
Binds Reflection.Assembly to a variable lines 179–185
179:90… 22H2.
180 # Ideally this would just be
181 # [System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture
182 # but that gets a type from the wrong assembly on Windows PowerShell (i.e. not Core)
183 $a = [System.Reflection.Assembly]::LoadWithPartialName("System.Runtime.InteropServices.RuntimeInformation")
184 $t = $a.GetType("System.Runtime.InteropServices.RuntimeInformation")
185 …

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.