Skip to content

Commit cd42417

Browse files
MSP-Gregeregon
authored andcommitted
MSP-Greg/setup-msys2-gcc -> ruby/setup-msys2-gcc, rmdirSync -> rmSync
1 parent 3c76dcf commit cd42417

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

dist/index.js

Lines changed: 6 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

windows.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,12 @@ const rubyInstallerVersions = require('./windows-versions.json')
1414
const drive = common.drive
1515

1616
const 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
1920
const 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
2223
const msys1 = `${drive}:\\DevKit64`
2324
const 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.
9394
async 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
107108
async 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

Comments
 (0)