From bd6859cc587faeeb3aead12917df2053a48d75b2 Mon Sep 17 00:00:00 2001 From: Benoit Daloze Date: Fri, 25 Jul 2025 20:25:02 +0200 Subject: [PATCH 1/2] Use core.group() instead of startGroup/endGroup --- common.js | 29 ++++++++++++++--------------- dist/index.js | 29 ++++++++++++++--------------- 2 files changed, 28 insertions(+), 30 deletions(-) diff --git a/common.js b/common.js index de1598457..02e57b237 100644 --- a/common.js +++ b/common.js @@ -360,24 +360,23 @@ export function setupPath(newPathEntries) { const originalPath = process.env[envPath].split(path.delimiter) let cleanPath = originalPath.filter(entry => !/\bruby\b/i.test(entry)) - core.startGroup(`Modifying ${envPath}`) - - // First remove the conflicting path entries - if (cleanPath.length !== originalPath.length) { - console.log(`Entries removed from ${envPath} to avoid conflicts with default Ruby:`) - for (const entry of originalPath) { - if (!cleanPath.includes(entry)) { - console.log(` ${entry}`) + core.group(`Modifying ${envPath}`, async () => { + // First remove the conflicting path entries + if (cleanPath.length !== originalPath.length) { + console.log(`Entries removed from ${envPath} to avoid conflicts with default Ruby:`) + for (const entry of originalPath) { + if (!cleanPath.includes(entry)) { + console.log(` ${entry}`) + } } + core.exportVariable(envPath, cleanPath.join(path.delimiter)) } - core.exportVariable(envPath, cleanPath.join(path.delimiter)) - } - console.log(`Entries added to ${envPath} to use selected Ruby:`) - for (const entry of newPathEntries) { - console.log(` ${entry}`) - } - core.endGroup() + console.log(`Entries added to ${envPath} to use selected Ruby:`) + for (const entry of newPathEntries) { + console.log(` ${entry}`) + } + }) core.addPath(newPathEntries.join(path.delimiter)) } diff --git a/dist/index.js b/dist/index.js index 160f36172..d82a17d0d 100644 --- a/dist/index.js +++ b/dist/index.js @@ -677,24 +677,23 @@ function setupPath(newPathEntries) { const originalPath = process.env[envPath].split(path.delimiter) let cleanPath = originalPath.filter(entry => !/\bruby\b/i.test(entry)) - core.startGroup(`Modifying ${envPath}`) - - // First remove the conflicting path entries - if (cleanPath.length !== originalPath.length) { - console.log(`Entries removed from ${envPath} to avoid conflicts with default Ruby:`) - for (const entry of originalPath) { - if (!cleanPath.includes(entry)) { - console.log(` ${entry}`) + core.group(`Modifying ${envPath}`, async () => { + // First remove the conflicting path entries + if (cleanPath.length !== originalPath.length) { + console.log(`Entries removed from ${envPath} to avoid conflicts with default Ruby:`) + for (const entry of originalPath) { + if (!cleanPath.includes(entry)) { + console.log(` ${entry}`) + } } + core.exportVariable(envPath, cleanPath.join(path.delimiter)) } - core.exportVariable(envPath, cleanPath.join(path.delimiter)) - } - console.log(`Entries added to ${envPath} to use selected Ruby:`) - for (const entry of newPathEntries) { - console.log(` ${entry}`) - } - core.endGroup() + console.log(`Entries added to ${envPath} to use selected Ruby:`) + for (const entry of newPathEntries) { + console.log(` ${entry}`) + } + }) core.addPath(newPathEntries.join(path.delimiter)) } From e8621f0b86851d7377d85882bb751b24dfadd958 Mon Sep 17 00:00:00 2001 From: Jason Frey Date: Thu, 24 Jul 2025 16:32:05 -0400 Subject: [PATCH 2/2] Add printing of the lockfile after installation Closes #783 --- dist/index.js | 3 +++ index.js | 3 +++ 2 files changed, 6 insertions(+) diff --git a/dist/index.js b/dist/index.js index d82a17d0d..8f55653ad 100644 --- a/dist/index.js +++ b/dist/index.js @@ -85350,6 +85350,9 @@ async function setupRuby(options = {}) { if (inputs['bundler-cache'] === 'true') { await common.time('bundle install', async () => bundler.bundleInstall(gemfile, lockFile, platform, engine, version, bundlerVersion, inputs['cache-version'])) + + await core.group(`Print lockfile`, async () => + await exec.exec('cat', [lockFile])) } core.setOutput('ruby-prefix', rubyPrefix) diff --git a/index.js b/index.js index 62e46feb9..31c2ccc80 100644 --- a/index.js +++ b/index.js @@ -99,6 +99,9 @@ export async function setupRuby(options = {}) { if (inputs['bundler-cache'] === 'true') { await common.time('bundle install', async () => bundler.bundleInstall(gemfile, lockFile, platform, engine, version, bundlerVersion, inputs['cache-version'])) + + await core.group(`Print lockfile`, async () => + await exec.exec('cat', [lockFile])) } core.setOutput('ruby-prefix', rubyPrefix)