@@ -8,6 +8,9 @@ const exec = require('@actions/exec')
88const  tc  =  require ( '@actions/tool-cache' ) 
99const  rubyInstallerVersions  =  require ( './windows-versions' ) . versions 
1010
11+ // Extract to SSD, see https://github.com/ruby/setup-ruby/pull/14 
12+ const  drive  =  ( process . env [ 'GITHUB_WORKSPACE' ]  ||  'C' ) [ 0 ] 
13+ 
1114// needed for 2.2, 2.3, and mswin, cert file used by Git for Windows 
1215const  certFile  =  'C:\\Program Files\\Git\\mingw64\\ssl\\cert.pem' 
1316
@@ -16,7 +19,7 @@ const msys2 = 'C:\\msys64'
1619const  msys2PathEntries  =  [ `${ msys2 }  ,  `${ msys2 }  ] 
1720
1821// location & path for old RubyInstaller DevKit (MSYS), Ruby 2.2 and 2.3 
19- const  msys  =  'C :\\DevKit64' 
22+ const  msys  =  ` ${ drive } ` 
2023const  msysPathEntries  =  [ `${ msys }  , 
2124  `${ msys }  ,  `${ msys }  ] 
2225
@@ -38,9 +41,6 @@ export async function install(platform, ruby) {
3841  } 
3942  const  base  =  url . slice ( url . lastIndexOf ( '/' )  +  1 ,  url . length  -  '.7z' . length ) 
4043
41-   // Extract to SSD, see https://github.com/ruby/setup-ruby/pull/14 
42-   const  drive  =  ( process . env [ 'GITHUB_WORKSPACE' ]  ||  'C' ) [ 0 ] 
43- 
4444  const  downloadPath  =  await  tc . downloadTool ( url ) 
4545  await  exec . exec ( '7z' ,  [ 'x' ,  downloadPath ,  `-xr!${ base }  ,  `-o${ drive }  ] ,  {  silent : true  } ) 
4646  const  rubyPrefix  =  `${ drive } ${ base }  
0 commit comments