mirror of
https://github.com/danbulant/deno_install
synced 2026-06-24 17:21:48 +00:00
ps: Add -UseBasicParsing flag (#57)
This commit is contained in:
parent
a98d36778d
commit
1257b7e42f
2 changed files with 10 additions and 10 deletions
16
README.md
16
README.md
|
|
@ -17,7 +17,7 @@ curl -fsSL https://deno.land/x/install/install.sh | sh
|
||||||
**With PowerShell:**
|
**With PowerShell:**
|
||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
iwr https://deno.land/x/install/install.ps1 | iex
|
iwr https://deno.land/x/install/install.ps1 -useb | iex
|
||||||
```
|
```
|
||||||
|
|
||||||
## Install Specific Version
|
## Install Specific Version
|
||||||
|
|
@ -31,7 +31,7 @@ curl -fsSL https://deno.land/x/install/install.sh | sh -s v0.2.10
|
||||||
**With PowerShell:**
|
**With PowerShell:**
|
||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
iwr https://deno.land/x/install/install.ps1 -out install.ps1; .\install.ps1 v0.2.10
|
iwr https://deno.land/x/install/install.ps1 -useb -outf install.ps1; .\install.ps1 v0.2.10
|
||||||
```
|
```
|
||||||
|
|
||||||
## Install via Package Manager
|
## Install via Package Manager
|
||||||
|
|
@ -58,11 +58,11 @@ See [denoland/deno#1486](https://github.com/denoland/deno/issues/1486).
|
||||||
### Could not create SSL/TLS secure channel
|
### Could not create SSL/TLS secure channel
|
||||||
|
|
||||||
```
|
```
|
||||||
PS C:\> iwr https://deno.land/x/install/install.ps1 | iex
|
PS C:\> iwr https://deno.land/x/install/install.ps1 -useb | iex
|
||||||
iwr : The request was aborted: Could not create SSL/TLS secure channel.
|
iwr : The request was aborted: Could not create SSL/TLS secure channel.
|
||||||
At line:1 char:1
|
At line:1 char:1
|
||||||
+ iwr https://deno.land/x/install/install.ps1 | iex
|
+ iwr https://deno.land/x/install/install.ps1 -useb | iex
|
||||||
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
+ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebException
|
+ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebException
|
||||||
+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand
|
+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand
|
||||||
```
|
```
|
||||||
|
|
@ -82,10 +82,10 @@ Configure your system to use an up-to-date security protocol, such as, TLS 1.2:
|
||||||
### Running scripts is disabled
|
### Running scripts is disabled
|
||||||
|
|
||||||
```
|
```
|
||||||
PS C:\> iwr https://deno.land/x/install/install.ps1 -out install.ps1; .\install.ps1 v0.2.10
|
PS C:\> iwr https://deno.land/x/install/install.ps1 -useb -outf install.ps1; .\install.ps1 v0.2.10
|
||||||
.\install.ps1 : File C:\install.ps1 cannot be loaded because running scripts is disabled on this system. For more information, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.
|
.\install.ps1 : File C:\install.ps1 cannot be loaded because running scripts is disabled on this system. For more information, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.
|
||||||
At line:1 char:63
|
At line:1 char:71
|
||||||
+ ... no.land/x/install/install.ps1 -out install.ps1; .\install.ps1 v0.2.10
|
+ ... /x/install/install.ps1 -useb -outf install.ps1; .\install.ps1 v0.2.10
|
||||||
+ ~~~~~~~~~~~~~
|
+ ~~~~~~~~~~~~~
|
||||||
+ CategoryInfo : SecurityError: (:) [], ParentContainsErrorRecordException
|
+ CategoryInfo : SecurityError: (:) [], ParentContainsErrorRecordException
|
||||||
+ FullyQualifiedErrorId : UnauthorizedAccess
|
+ FullyQualifiedErrorId : UnauthorizedAccess
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@ $OS = if ($IsWindows) {
|
||||||
}
|
}
|
||||||
|
|
||||||
$DenoUri = if (!$Version) {
|
$DenoUri = if (!$Version) {
|
||||||
$Response = Invoke-WebRequest 'https://github.com/denoland/deno/releases'
|
$Response = Invoke-WebRequest 'https://github.com/denoland/deno/releases' -UseBasicParsing
|
||||||
if ($PSVersionTable.PSEdition -eq 'Core') {
|
if ($PSVersionTable.PSEdition -eq 'Core') {
|
||||||
$Response.Links |
|
$Response.Links |
|
||||||
Where-Object { $_.href -like "/denoland/deno/releases/download/*/deno_${OS}_x64.$Zip" } |
|
Where-Object { $_.href -like "/denoland/deno/releases/download/*/deno_${OS}_x64.$Zip" } |
|
||||||
|
|
@ -75,7 +75,7 @@ if (!(Test-Path $BinDir)) {
|
||||||
New-Item $BinDir -ItemType Directory | Out-Null
|
New-Item $BinDir -ItemType Directory | Out-Null
|
||||||
}
|
}
|
||||||
|
|
||||||
Invoke-WebRequest $DenoUri -OutFile $DenoZip
|
Invoke-WebRequest $DenoUri -OutFile $DenoZip -UseBasicParsing
|
||||||
|
|
||||||
if ($IsWindows) {
|
if ($IsWindows) {
|
||||||
Expand-Archive $DenoZip -Destination $BinDir -Force
|
Expand-Archive $DenoZip -Destination $BinDir -Force
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue