From 71286528a38c9d9984135bec37a62a848b9f13c6 Mon Sep 17 00:00:00 2001 From: Don Olmstead Date: Mon, 6 Oct 2025 16:32:44 -0700 Subject: [PATCH] refactor(): use choco for ruby Install ruby through chocolatey. --- WebKitDev/Functions/Install-Ruby.ps1 | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/WebKitDev/Functions/Install-Ruby.ps1 b/WebKitDev/Functions/Install-Ruby.ps1 index 526bf7e..2a52e04 100644 --- a/WebKitDev/Functions/Install-Ruby.ps1 +++ b/WebKitDev/Functions/Install-Ruby.ps1 @@ -27,17 +27,14 @@ function Install-Ruby { [AllowNull()] [string]$installationPath ) - - $url = ('https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-{0}/rubyinstaller-{0}-x64.exe' -f $version); - - $options = @( - '/verysilent', - '/tasks="assocfiles,modpath"' - ); + $packageParameters = @(); if ($installationPath) { - $options += ('/dir="{0}"' -f $installationPath); + $packageParameters += ('/InstallDir:"{0}"' -f $installationPath); } - Install-FromExe -Name 'ruby' -url $url -Options $options; + Install-FromChoco ` + -Name 'ruby' ` + -Version $version ` + -PackageParameters $packageParameters; }