We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 65bcbb1 commit 5ffd738Copy full SHA for 5ffd738
.vsts-ci/templates/release-general.yml
@@ -1,4 +1,19 @@
1
steps:
2
+- powershell: |
3
+ Write-Host "Installing pwsh..."
4
+ if (Get-Command pwsh -ErrorAction Ignore)
5
+ {
6
+ Write-Host "pwsh already installed, skipping"
7
+ return
8
+ }
9
+ $powerShellPath = Join-Path -Path $env:AGENT_TEMPDIRECTORY -ChildPath 'powershell'
10
+ Invoke-WebRequest -Uri https://raw.githubusercontent.com/PowerShell/PowerShell/master/tools/install-powershell.ps1 -outfile ./install-powershell.ps1
11
+ ./install-powershell.ps1 -Destination $powerShellPath
12
+ $vstsCommandString = "vso[task.setvariable variable=PATH]$powerShellPath;$env:PATH"
13
+ Write-Host "sending " + $vstsCommandString
14
+ Write-Host "##$vstsCommandString"
15
+ displayName: Install PowerShell Core
16
+
17
- pwsh: |
18
Get-ChildItem -Path env:
19
displayName: Capture environment
0 commit comments