@@ -14,11 +14,12 @@ const rubyInstallerVersions = require('./windows-versions.json')
1414const drive = common . drive
1515
1616const msys2BasePath = 'C:\\msys64'
17+ const msys2GCCReleaseURI = 'https://github.com/ruby/setup-msys2-gcc/releases/download'
1718
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
1920const certFile = 'C:\\Program Files\\Git\\mingw64\\ssl\\cert.pem'
2021
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
2223const msys1 = `${ drive } :\\DevKit64`
2324const msysPathEntries = [ `${ msys1 } \\mingw\\x86_64-w64-mingw32\\bin` , `${ msys1 } \\mingw\\bin` , `${ msys1 } \\bin` ]
2425
@@ -92,7 +93,7 @@ export async function install(platform, engine, version) {
9293// and also install ucrt tools on earlier versions, which have msys2 and mingw tools preinstalled.
9394async function installGCCTools ( type ) {
9495 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`
9697 console . log ( url )
9798 return await tc . downloadTool ( url )
9899 } )
@@ -106,14 +107,14 @@ async function installGCCTools(type) {
106107// A subset of the MSYS2 base-devel group
107108async function installMSYS2Tools ( ) {
108109 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`
110111 console . log ( url )
111112 return await tc . downloadTool ( url )
112113 } )
113114
114115 // need to remove all directories, since they may indicate old packages are installed,
115116 // 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 } )
117118
118119 await common . measure ( `Extracting msys2 build tools` , async ( ) =>
119120 // -aoa overwrite existing, -bd disable progress indicator
0 commit comments