@@ -360,24 +360,23 @@ export function setupPath(newPathEntries) {
360360 const originalPath = process.env[envPath].split(path.delimiter)
361361 let cleanPath = originalPath.filter(entry => !/\bruby\b/i.test(entry))
362362
363- core.startGroup (`Modifying ${envPath}`)
364-
365- // First remove the conflicting path entries
366- if (cleanPath.length !== originalPath.length) {
367- console.log(`Entries removed from ${envPath} to avoid conflicts with default Ruby:`)
368- for (const entry of originalPath ) {
369- if (!cleanPath.includes(entry)) {
370- console.log(` ${entry}`)
363+ core.group (`Modifying ${envPath}`, async () => {
364+ // First remove the conflicting path entries
365+ if (cleanPath.length !== originalPath.length) {
366+ console.log(`Entries removed from ${envPath} to avoid conflicts with default Ruby:`)
367+ for (const entry of originalPath) {
368+ if (!cleanPath.includes(entry) ) {
369+ console.log(` ${entry}`)
370+ }
371371 }
372+ core.exportVariable(envPath, cleanPath.join(path.delimiter))
372373 }
373- core.exportVariable(envPath, cleanPath.join(path.delimiter))
374- }
375374
376- console.log(`Entries added to ${envPath} to use selected Ruby:`)
377- for (const entry of newPathEntries) {
378- console.log(` ${entry}`)
379- }
380- core.endGroup( )
375+ console.log(`Entries added to ${envPath} to use selected Ruby:`)
376+ for (const entry of newPathEntries) {
377+ console.log(` ${entry}`)
378+ }
379+ } )
381380
382381 core.addPath(newPathEntries.join(path.delimiter))
383382}
0 commit comments