mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2025-12-24 02:18:40 +08:00
Fix documentation for Python and Ruby on Windows images (#478)
* Remove separate Python installation for Windows * Remove Python2 symlink creation * Move install-ruby and install-python to download-toolcache * Improve download-toolcache for windows * Small fix in docs for ruby * V mapetr/test alt toolcache docs (#8) * Merge Validate-Ruby and Validate-Python with Validate-Toolcache * Small fix in output * Small fix in download toolcache output
This commit is contained in:
@@ -1,28 +0,0 @@
|
||||
################################################################################
|
||||
## File: Install-Python.ps1
|
||||
## Desc: Configure python on path with 3.6.* version from the tools cache
|
||||
## Must run after tools cache is setup
|
||||
################################################################################
|
||||
|
||||
Import-Module -Name ImageHelpers -Force
|
||||
|
||||
$python36path = $Env:AGENT_TOOLSDIRECTORY + '/Python/3.6*/x64'
|
||||
$pythonDir = Get-Item -Path $python36path
|
||||
|
||||
if($pythonDir -is [array])
|
||||
{
|
||||
Write-Host "More than one python 3.6.* installations found"
|
||||
Write-Host $pythonDir
|
||||
exit 1
|
||||
}
|
||||
|
||||
$currentPath = Get-MachinePath
|
||||
|
||||
if ($currentPath | Select-String -SimpleMatch $pythonDir.FullName)
|
||||
{
|
||||
Write-Host $pythonDir.FullName ' is already in PATH'
|
||||
exit 0
|
||||
}
|
||||
|
||||
Add-MachinePathItem -PathItem $pythonDir.FullName
|
||||
Add-MachinePathItem -PathItem "$($pythonDir.FullName)\Scripts"
|
||||
Reference in New Issue
Block a user