@@ -36,9 +36,9 @@ export async function install(platform, ruby) {
3636 // we use certs and embedded MSYS2 from hostedRuby
3737 const hostedRuby = latestHostedRuby ( )
3838
39- let toolsPaths = ( version === 'mswin' ) ?
39+ let toolchainPaths = ( version === 'mswin' ) ?
4040 await setupMSWin ( hostedRuby ) : await setupMingw ( hostedRuby , version )
41- const newPathEntries = [ `${ rubyPrefix } \\bin` , ...toolsPaths ]
41+ const newPathEntries = [ `${ rubyPrefix } \\bin` , ...toolchainPaths ]
4242
4343 // Install Bundler if needed
4444 if ( ! fs . existsSync ( `${ rubyPrefix } \\bin\\bundle.cmd` ) ) {
@@ -90,8 +90,8 @@ async function setupMSWin(hostedRuby) {
9090 return addVCVARSEnv ( )
9191}
9292
93- /* Sets msvc environment for use in Actions
94- * allows steps to run without running vcvars*.bat, also allows using PS scripts
93+ /* Sets MSVC environment for use in Actions
94+ * allows steps to run without running vcvars*.bat, also for PowerShell
9595 * adds a convenience VCVARS environment variable
9696 * this assumes a single Visual Studio version being available in the windows-latest image */
9797export function addVCVARSEnv ( ) {
@@ -107,15 +107,15 @@ export function addVCVARSEnv() {
107107 newEnv . set ( k , v )
108108 } )
109109
110- let newPathEntries = null
110+ let newPathEntries = undefined
111111 for ( let [ k , v ] of newEnv ) {
112112 if ( process . env [ k ] !== v ) {
113113 if ( k === 'Path' ) {
114- newPathEntries = v . replace ( process . env [ 'Path' ] , '' )
114+ newPathEntries = v . replace ( process . env [ 'Path' ] , '' ) . split ( ';' )
115115 } else {
116116 core . exportVariable ( k , v )
117117 }
118118 }
119119 }
120- return [ newPathEntries ]
120+ return newPathEntries
121121}
0 commit comments