Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .vsts-ci/install-ps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ trigger:
- /tools/installpsh-osx.sh
- /tools/installpsh-redhat.sh
- /tools/installpsh-suse.sh
- /tools/install-powershell.ps1
pr:
branches:
include:
Expand All @@ -27,6 +28,7 @@ pr:
- /tools/installpsh-osx.sh
- /tools/installpsh-redhat.sh
- /tools/installpsh-suse.sh
- /tools/install-powershell.ps1

variables:
DOTNET_CLI_TELEMETRY_OPTOUT: 1
Expand All @@ -47,3 +49,9 @@ phases:
scriptName: ./tools/install-powershell.sh
jobName: InstallPowerShellMacOS
pool: Hosted macOS

- template: templates/install-ps-phase.yml
parameters:
scriptName: pwsh -c ./tools/install-powershell.ps1 -AddToPath
jobName: InstallPowerShellPS1Ubuntu
pool: Hosted Ubuntu 1604
2 changes: 1 addition & 1 deletion tools/install-powershell.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ try {
if ($uid -ne "0") { $SUDO = "sudo" } else { $SUDO = "" }

Write-Verbose "Make symbolic link '$symlink' point to '$targetPath'..." -Verbose
Invoke-Expression -Command "$SUDO ln -fs $targetPath $symlink"
& $SUDO ln -fs $targetPath $symlink

if ($LASTEXITCODE -ne 0) {
Write-Error "Could not add to PATH: failed to make '$symlink' point to '$targetPath'."
Expand Down