Skip to content

Commit

Permalink
Don't group bundle install output
Browse files Browse the repository at this point in the history
* So any error from Bundler is immediately shown.
* Some users do not realize they should expand the group apparently.
  • Loading branch information
eregon committed Feb 11, 2023
1 parent a26e1fb commit 2cf593d
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 2 deletions.
13 changes: 13 additions & 0 deletions common.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,19 @@ export async function measure(name, block) {
}
}

// Same as mesaure() but without the group
export async function time(name, block) {
console.log(`> ${name}`)
const start = performance.now()
try {
return await block()
} finally {
const end = performance.now()
const duration = (end - start) / 1000.0
console.log(`Took ${duration.toFixed(2).padStart(6)} seconds`)
}
}

export function isHeadVersion(rubyVersion) {
return ['head', 'debug', 'mingw', 'mswin', 'ucrt'].includes(rubyVersion)
}
Expand Down
16 changes: 15 additions & 1 deletion dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export async function setupRuby(options = {}) {
}

if (inputs['bundler-cache'] === 'true') {
await common.measure('bundle install', async () =>
await common.time('bundle install', async () =>
bundler.bundleInstall(gemfile, lockFile, platform, engine, version, bundlerVersion, inputs['cache-version']))
}

Expand Down

0 comments on commit 2cf593d

Please sign in to comment.