Compare commits

...
2 Commits
Author SHA1 Message Date
Jason Frey e8621f0b86 Add printing of the lockfile after installation
Closes #783
2025-07-25 20:36:32 +02:00
Benoit Daloze bd6859cc58 Use core.group() instead of startGroup/endGroup 2025-07-25 20:25:02 +02:00
3 changed files with 34 additions and 30 deletions
+14 -15
View File
@@ -360,24 +360,23 @@ 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:`) for (const entry of originalPath) {
for (const entry of originalPath) { if (!cleanPath.includes(entry)) {
if (!cleanPath.includes(entry)) { console.log(` ${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:`) console.log(`Entries added to ${envPath} to use selected Ruby:`)
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
+17 -15
View File
@@ -677,24 +677,23 @@ 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:`) for (const entry of originalPath) {
for (const entry of originalPath) { if (!cleanPath.includes(entry)) {
if (!cleanPath.includes(entry)) { console.log(` ${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:`) console.log(`Entries added to ${envPath} to use selected Ruby:`)
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))
} }
@@ -85351,6 +85350,9 @@ async function setupRuby(options = {}) {
if (inputs['bundler-cache'] === 'true') { if (inputs['bundler-cache'] === 'true') {
await common.time('bundle install', async () => await common.time('bundle install', async () =>
bundler.bundleInstall(gemfile, lockFile, platform, engine, version, bundlerVersion, inputs['cache-version'])) 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) core.setOutput('ruby-prefix', rubyPrefix)
+3
View File
@@ -99,6 +99,9 @@ export async function setupRuby(options = {}) {
if (inputs['bundler-cache'] === 'true') { if (inputs['bundler-cache'] === 'true') {
await common.time('bundle install', async () => await common.time('bundle install', async () =>
bundler.bundleInstall(gemfile, lockFile, platform, engine, version, bundlerVersion, inputs['cache-version'])) 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) core.setOutput('ruby-prefix', rubyPrefix)