Skip to content

Commit 98fb8cb

Browse files
authored
refactor(): use choco for ruby (#40)
Install ruby through chocolatey.
1 parent 75d6309 commit 98fb8cb

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

WebKitDev/Functions/Install-Ruby.ps1

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,14 @@ function Install-Ruby {
2727
[AllowNull()]
2828
[string]$installationPath
2929
)
30-
31-
$url = ('https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-{0}/rubyinstaller-{0}-x64.exe' -f $version);
32-
33-
$options = @(
34-
'/verysilent',
35-
'/tasks="assocfiles,modpath"'
36-
);
30+
$packageParameters = @();
3731

3832
if ($installationPath) {
39-
$options += ('/dir="{0}"' -f $installationPath);
33+
$packageParameters += ('/InstallDir:"{0}"' -f $installationPath);
4034
}
4135

42-
Install-FromExe -Name 'ruby' -url $url -Options $options;
36+
Install-FromChoco `
37+
-Name 'ruby' `
38+
-Version $version `
39+
-PackageParameters $packageParameters;
4340
}

0 commit comments

Comments
 (0)