Skip to content

Commit 817680c

Browse files
hsbtclaude
authored andcommitted
Set SSL_CERT_FILE regardless of windows-toolchain
DevKit Rubies got it only from the DevKit setup, so `windows-toolchain: none` left them without CA certificates while mswin had them. It is their OpenSSL that needs the certificates, not the toolchain. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 6fd5016 commit 817680c

2 files changed

Lines changed: 20 additions & 26 deletions

File tree

‎dist/index.js‎

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

‎windows.js‎

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,15 @@ export async function install(platform, engine, version) {
4444
await downloadAndExtract(engine, version, url, base, rubyPrefix);
4545
}
4646

47-
if (version === 'mswin') {
47+
const toolchainUrl = toolchainVersions[version][os.arch()]
48+
49+
// Examples:
50+
// - DevKit-mingw64-64-4.7.2-20130224-1432-sfx.exe
51+
// - msys2-clangarm64.7z
52+
// - vcpkg-x64-windows.7z
53+
const toolchainName = path.posix.basename(toolchainUrl).split('-')[0].toLowerCase()
54+
55+
if (toolchainName === 'devkit' || version === 'mswin') {
4856
exportEnv({ SSL_CERT_FILE: findGitCertFile() })
4957
}
5058

@@ -55,14 +63,6 @@ export async function install(platform, engine, version) {
5563
return rubyPrefix
5664
}
5765

58-
const toolchainUrl = toolchainVersions[version][os.arch()]
59-
60-
// Examples:
61-
// - DevKit-mingw64-64-4.7.2-20130224-1432-sfx.exe
62-
// - msys2-clangarm64.7z
63-
// - vcpkg-x64-windows.7z
64-
const toolchainName = path.posix.basename(toolchainUrl).split('-')[0].toLowerCase()
65-
6666
if (toolchainName === 'msys2') {
6767
paths.push(...await installMSYS2(toolchainUrl, rubyPrefix))
6868
} else {
@@ -168,8 +168,6 @@ function findGitCertFile() {
168168
}
169169

170170
async function installMSYS1(url) {
171-
const certFile = findGitCertFile()
172-
173171
const downloadPath = await common.measure('Downloading msys1 build tools', async () => {
174172
console.log(url)
175173
return await common.download(url)
@@ -194,8 +192,7 @@ async function installMSYS1(url) {
194192
CPP: 'cpp',
195193
CXX: 'g++',
196194
MAKE: 'make',
197-
RI_DEVKIT: msys1Path,
198-
SSL_CERT_FILE: certFile
195+
RI_DEVKIT: msys1Path
199196
})
200197
})
201198

0 commit comments

Comments
 (0)