@@ -53,7 +53,7 @@ export async function install(platform, engine, version) {
5353 const toolchainName = path . posix . basename ( toolchainUrl ) . split ( '-' ) [ 0 ] . toLowerCase ( )
5454
5555 if ( toolchainName === 'devkit' || version === 'mswin' ) {
56- exportEnv ( { SSL_CERT_FILE : findGitCertFile ( ) } )
56+ await setupSslCertFile ( )
5757 }
5858
5959 const paths = [ `${ rubyPrefix } \\bin` ]
@@ -154,17 +154,20 @@ async function installMSYS2(url, rubyPrefix = process.env.RUNNER_TEMP) {
154154}
155155
156156// DevKit and mswin Rubies have no usable CA certificates on runners, so they use the bundle of Git for Windows
157- function findGitCertFile ( ) {
158- const certFile = [
159- 'C:\\Program Files\\Git\\ucrt64\\etc\\ssl\\cert.pem' ,
160- 'C:\\Program Files\\Git\\mingw64\\etc\\ssl\\cert.pem' ,
161- 'C:\\Program Files\\Git\\mingw64\\ssl\\cert.pem' ,
162- 'C:\\Program Files\\Git\\clangarm64\\etc\\ssl\\cert.pem' ,
163- ] . find ( file => fs . existsSync ( file ) )
164- if ( certFile === undefined ) {
165- throw new Error ( "Cannot find Git's cert file" )
166- }
167- return certFile
157+ async function setupSslCertFile ( ) {
158+ await core . group ( 'Setting up CA certificates' , async ( ) => {
159+ const certFile = [
160+ 'C:\\Program Files\\Git\\ucrt64\\etc\\ssl\\cert.pem' ,
161+ 'C:\\Program Files\\Git\\mingw64\\etc\\ssl\\cert.pem' ,
162+ 'C:\\Program Files\\Git\\mingw64\\ssl\\cert.pem' ,
163+ 'C:\\Program Files\\Git\\clangarm64\\etc\\ssl\\cert.pem' ,
164+ ] . find ( file => fs . existsSync ( file ) )
165+ if ( certFile === undefined ) {
166+ throw new Error ( "Cannot find Git's cert file" )
167+ }
168+
169+ exportEnv ( { SSL_CERT_FILE : certFile } )
170+ } )
168171}
169172
170173async function installMSYS1 ( url ) {
0 commit comments