Skip to content

Commit 2cf593d

Browse files
committed
Don't group bundle install output
* So any error from Bundler is immediately shown. * Some users do not realize they should expand the group apparently.
1 parent a26e1fb commit 2cf593d

File tree

3 files changed

+29
-2
lines changed

3 files changed

+29
-2
lines changed

common.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,19 @@ export async function measure(name, block) {
4747
}
4848
}
4949

50+
// Same as mesaure() but without the group
51+
export async function time(name, block) {
52+
console.log(`> ${name}`)
53+
const start = performance.now()
54+
try {
55+
return await block()
56+
} finally {
57+
const end = performance.now()
58+
const duration = (end - start) / 1000.0
59+
console.log(`Took ${duration.toFixed(2).padStart(6)} seconds`)
60+
}
61+
}
62+
5063
export function isHeadVersion(rubyVersion) {
5164
return ['head', 'debug', 'mingw', 'mswin', 'ucrt'].includes(rubyVersion)
5265
}

dist/index.js

Lines changed: 15 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ export async function setupRuby(options = {}) {
9292
}
9393

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

0 commit comments

Comments
 (0)