@@ -13,14 +13,14 @@ const rubyInstallerVersions = require('./windows-versions').versions
13
13
// Extract to SSD, see https://github.com/ruby/setup-ruby/pull/14
14
14
const drive = ( process . env [ 'GITHUB_WORKSPACE' ] || 'C' ) [ 0 ]
15
15
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
17
17
const certFile = 'C:\\Program Files\\Git\\mingw64\\ssl\\cert.pem'
18
18
19
19
// standard MSYS2 location, found by 'devkit.rb'
20
20
const msys2 = 'C:\\msys64'
21
21
const msys2PathEntries = [ `${ msys2 } \\mingw64\\bin` , `${ msys2 } \\usr\\bin` ]
22
22
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
24
24
const msys = `${ drive } :\\DevKit64`
25
25
const msysPathEntries = [ `${ msys } \\mingw\\x86_64-w64-mingw32\\bin` ,
26
26
`${ msys } \\mingw\\bin` , `${ msys } \\bin` ]
@@ -73,7 +73,7 @@ async function symLinkToEmbeddedMSYS2() {
73
73
async function setupMingw ( version ) {
74
74
core . exportVariable ( 'MAKE' , 'make.exe' )
75
75
76
- if ( version . startsWith ( '2.2' ) || version . startsWith ( '2.3' ) ) {
76
+ if ( version . match ( / ^ 2 \. [ 1 2 3 ] / ) ) {
77
77
core . exportVariable ( 'SSL_CERT_FILE' , certFile )
78
78
await common . measure ( 'Installing MSYS1' , async ( ) =>
79
79
installMSYS ( version ) )
@@ -89,7 +89,7 @@ async function setupMingw(version) {
89
89
}
90
90
}
91
91
92
- // Ruby 2.2 and 2.3
92
+ // Ruby 2.1, 2. 2 and 2.3
93
93
async function installMSYS ( version ) {
94
94
const url = 'https://dl.bintray.com/oneclick/rubyinstaller/DevKit-mingw64-64-4.7.2-20130224-1432-sfx.exe'
95
95
const downloadPath = await tc . downloadTool ( url )
0 commit comments