59b86cff-58f2-4ba8-9123-792824863eca
Calls a provider property setter cmdletBinds Reflection.Assembly to a variable
SHA-2560bc642a0b91dacec989f3176dcaab876ff9d050bc19a196ac2249a93129e5c85
MaleculeK(Am)H₆(Cm₈Db₆F₅Os₆Po₂)
Evidence
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 …
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
84:6… ion Install-Binary($install_args) {
85 if ($Help) {
86 Get-Help $PSCommandPath -Detailed
87 Exit
88 }
⋯6 lines
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 …
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 …