File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change
1
+ [Net.ServicePointManager ]::SecurityProtocol = [Net.SecurityProtocolType ]::Tls12
2
+
1
3
$scriptRoot = Split-Path $MyInvocation.MyCommand.Path - Parent
2
4
$client = New-Object " System.Net.WebClient"
3
5
$url = " https://github.com/filipw/dotnet-script/releases/download/0.18.0/dotnet-script.0.18.0.zip"
4
6
$file = " $scriptRoot /dotnet-script.zip"
5
7
$client.DownloadFile ($url , $file )
6
- Expand-Archive $file - DestinationPath $scriptRoot - Force
7
-
8
+ Expand-Archive $file - DestinationPath $scriptRoot - Force
Original file line number Diff line number Diff line change
1
+ [Net.ServicePointManager ]::SecurityProtocol = [Net.SecurityProtocolType ]::Tls12
2
+
1
3
# Create a temporary folder to download to.
2
4
$tempFolder = Join-Path $env: TEMP " dotnet-script"
3
5
New-Item $tempFolder - ItemType Directory - Force
@@ -9,7 +11,7 @@ Select-Object tag_name
9
11
$tag_name = $latestRelease.tag_name
10
12
11
13
# Download the zip
12
- Write-Host " Downloading latest verson ($tag_name )"
14
+ Write-Host " Downloading latest version ($tag_name )"
13
15
$client = New-Object " System.Net.WebClient"
14
16
$url = " https://github.com/filipw/dotnet-script/releases/download/$tag_name /dotnet-script.$tag_name .zip"
15
17
$zipFile = Join-Path $tempFolder " dotnet-script.zip"
@@ -28,3 +30,5 @@ $paths += Join-Path $installationFolder "dotnet-script"
28
30
$path = $paths -join " ;"
29
31
30
32
[System.Environment ]::SetEnvironmentVariable(" path" , $path , [System.EnvironmentVariableTarget ]::User)
33
+
34
+ Write-Host " Successfully installed version ($tag_name )"
You can’t perform that action at this time.
0 commit comments