Use core.group() instead of startGroup/endGroup

This commit is contained in:
Benoit Daloze
2025-07-25 20:25:02 +02:00
parent 223e443f3e
commit bd6859cc58
2 changed files with 28 additions and 30 deletions
+2 -3
View File
@@ -360,8 +360,7 @@ export function setupPath(newPathEntries) {
const originalPath = process.env[envPath].split(path.delimiter) const originalPath = process.env[envPath].split(path.delimiter)
let cleanPath = originalPath.filter(entry => !/\bruby\b/i.test(entry)) let cleanPath = originalPath.filter(entry => !/\bruby\b/i.test(entry))
core.startGroup(`Modifying ${envPath}`) core.group(`Modifying ${envPath}`, async () => {
// First remove the conflicting path entries // First remove the conflicting path entries
if (cleanPath.length !== originalPath.length) { if (cleanPath.length !== originalPath.length) {
console.log(`Entries removed from ${envPath} to avoid conflicts with default Ruby:`) console.log(`Entries removed from ${envPath} to avoid conflicts with default Ruby:`)
@@ -377,7 +376,7 @@ export function setupPath(newPathEntries) {
for (const entry of newPathEntries) { for (const entry of newPathEntries) {
console.log(` ${entry}`) console.log(` ${entry}`)
} }
core.endGroup() })
core.addPath(newPathEntries.join(path.delimiter)) core.addPath(newPathEntries.join(path.delimiter))
} }
Generated Vendored
+2 -3
View File
@@ -677,8 +677,7 @@ function setupPath(newPathEntries) {
const originalPath = process.env[envPath].split(path.delimiter) const originalPath = process.env[envPath].split(path.delimiter)
let cleanPath = originalPath.filter(entry => !/\bruby\b/i.test(entry)) let cleanPath = originalPath.filter(entry => !/\bruby\b/i.test(entry))
core.startGroup(`Modifying ${envPath}`) core.group(`Modifying ${envPath}`, async () => {
// First remove the conflicting path entries // First remove the conflicting path entries
if (cleanPath.length !== originalPath.length) { if (cleanPath.length !== originalPath.length) {
console.log(`Entries removed from ${envPath} to avoid conflicts with default Ruby:`) console.log(`Entries removed from ${envPath} to avoid conflicts with default Ruby:`)
@@ -694,7 +693,7 @@ function setupPath(newPathEntries) {
for (const entry of newPathEntries) { for (const entry of newPathEntries) {
console.log(` ${entry}`) console.log(` ${entry}`)
} }
core.endGroup() })
core.addPath(newPathEntries.join(path.delimiter)) core.addPath(newPathEntries.join(path.delimiter))
} }