@@ -13,14 +13,14 @@ const rubyInstallerVersions = require('./windows-versions').versions
1313// Extract to SSD, see https://github.com/ruby/setup-ruby/pull/14
1414const drive = ( process . env [ 'GITHUB_WORKSPACE' ] || 'C' ) [ 0 ]
1515
16- // needed for 2.2, 2.3, and mswin, cert file used by Git for Windows
16+ // needed for 2.1, 2. 2, 2.3, and mswin, cert file used by Git for Windows
1717const certFile = 'C:\\Program Files\\Git\\mingw64\\ssl\\cert.pem'
1818
1919// standard MSYS2 location, found by 'devkit.rb'
2020const msys2 = 'C:\\msys64'
2121const msys2PathEntries = [ `${ msys2 } \\mingw64\\bin` , `${ msys2 } \\usr\\bin` ]
2222
23- // location & path for old RubyInstaller DevKit (MSYS), Ruby 2.2 and 2.3
23+ // location & path for old RubyInstaller DevKit (MSYS), Ruby 2.1, 2. 2 and 2.3
2424const msys = `${ drive } :\\DevKit64`
2525const msysPathEntries = [ `${ msys } \\mingw\\x86_64-w64-mingw32\\bin` ,
2626 `${ msys } \\mingw\\bin` , `${ msys } \\bin` ]
@@ -73,7 +73,7 @@ async function symLinkToEmbeddedMSYS2() {
7373async function setupMingw ( version ) {
7474 core . exportVariable ( 'MAKE' , 'make.exe' )
7575
76- if ( version . startsWith ( '2.2' ) || version . startsWith ( '2.3' ) ) {
76+ if ( version . match ( / ^ 2 \. [ 1 2 3 ] / ) ) {
7777 core . exportVariable ( 'SSL_CERT_FILE' , certFile )
7878 await common . measure ( 'Installing MSYS1' , async ( ) =>
7979 installMSYS ( version ) )
@@ -89,7 +89,7 @@ async function setupMingw(version) {
8989 }
9090}
9191
92- // Ruby 2.2 and 2.3
92+ // Ruby 2.1, 2. 2 and 2.3
9393async function installMSYS ( version ) {
9494 const url = 'https://dl.bintray.com/oneclick/rubyinstaller/DevKit-mingw64-64-4.7.2-20130224-1432-sfx.exe'
9595 const downloadPath = await tc . downloadTool ( url )
0 commit comments