@@ -14,11 +14,12 @@ const rubyInstallerVersions = require('./windows-versions.json')
14
14
const drive = common . drive
15
15
16
16
const msys2BasePath = 'C:\\msys64'
17
+ const msys2GCCReleaseURI = 'https://github.com/ruby/setup-msys2-gcc/releases/download'
17
18
18
- // needed for 2.0-2.3, and mswin, cert file used by Git for Windows
19
+ // needed for Ruby 2.0-2.3, and mswin, cert file used by Git for Windows
19
20
const certFile = 'C:\\Program Files\\Git\\mingw64\\ssl\\cert.pem'
20
21
21
- // location & path for old RubyInstaller DevKit (MSYS1), Ruby 2.0-2.3
22
+ // location & path for old RubyInstaller DevKit (MSYS1), used with Ruby 2.0-2.3
22
23
const msys1 = `${ drive } :\\DevKit64`
23
24
const msysPathEntries = [ `${ msys1 } \\mingw\\x86_64-w64-mingw32\\bin` , `${ msys1 } \\mingw\\bin` , `${ msys1 } \\bin` ]
24
25
@@ -92,7 +93,7 @@ export async function install(platform, engine, version) {
92
93
// and also install ucrt tools on earlier versions, which have msys2 and mingw tools preinstalled.
93
94
async function installGCCTools ( type ) {
94
95
const downloadPath = await common . measure ( `Downloading ${ type } build tools` , async ( ) => {
95
- let url = `https://github.com/MSP-Greg/setup-msys2-gcc/releases/download /msys2-gcc-pkgs/${ type } .7z`
96
+ let url = `${ msys2GCCReleaseURI } /msys2-gcc-pkgs/${ type } .7z`
96
97
console . log ( url )
97
98
return await tc . downloadTool ( url )
98
99
} )
@@ -106,14 +107,14 @@ async function installGCCTools(type) {
106
107
// A subset of the MSYS2 base-devel group
107
108
async function installMSYS2Tools ( ) {
108
109
const downloadPath = await common . measure ( `Downloading msys2 build tools` , async ( ) => {
109
- let url = `https://github.com/MSP-Greg/setup-msys2-gcc/releases/download /msys2-gcc-pkgs/msys2.7z`
110
+ let url = `${ msys2GCCReleaseURI } /msys2-gcc-pkgs/msys2.7z`
110
111
console . log ( url )
111
112
return await tc . downloadTool ( url )
112
113
} )
113
114
114
115
// need to remove all directories, since they may indicate old packages are installed,
115
116
// otherwise, error of "error: duplicated database entry"
116
- fs . rmdirSync ( `${ msys2BasePath } \\var\\lib\\pacman\\local` , { recursive : true , force : true } )
117
+ fs . rmSync ( `${ msys2BasePath } \\var\\lib\\pacman\\local` , { recursive : true , force : true } )
117
118
118
119
await common . measure ( `Extracting msys2 build tools` , async ( ) =>
119
120
// -aoa overwrite existing, -bd disable progress indicator
0 commit comments