From cf617ba62d79d2b498d5aabe4f511471fcb12d6f Mon Sep 17 00:00:00 2001 From: Benoit Daloze Date: Sun, 23 Jan 2022 12:25:23 +0100 Subject: [PATCH] Show `ruby --version` * This is particularly useful for head builds and is also reasonably fast for all supported Rubies. --- dist/index.js | 4 ++++ index.js | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/dist/index.js b/dist/index.js index a2216fc..03d87cd 100644 --- a/dist/index.js +++ b/dist/index.js @@ -59514,6 +59514,7 @@ const os = __nccwpck_require__(2087) const fs = __nccwpck_require__(5747) const path = __nccwpck_require__(5622) const core = __nccwpck_require__(2186) +const exec = __nccwpck_require__(1514) const common = __nccwpck_require__(4717) const rubygems = __nccwpck_require__(160) const bundler = __nccwpck_require__(1641) @@ -59574,6 +59575,9 @@ async function setupRuby(options = {}) { const rubyPrefix = await installer.install(platform, engine, version) + await common.measure('Print Ruby version', async () => + await exec.exec('ruby', ['--version'])) + if (inputs['rubygems'] !== 'default') { await common.measure('Updating RubyGems', async () => rubygems.rubygemsUpdate(inputs['rubygems'], rubyPrefix)) diff --git a/index.js b/index.js index 419d718..b41f574 100644 --- a/index.js +++ b/index.js @@ -2,6 +2,7 @@ const os = require('os') const fs = require('fs') const path = require('path') const core = require('@actions/core') +const exec = require('@actions/exec') const common = require('./common') const rubygems = require('./rubygems') const bundler = require('./bundler') @@ -62,6 +63,9 @@ export async function setupRuby(options = {}) { const rubyPrefix = await installer.install(platform, engine, version) + await common.measure('Print Ruby version', async () => + await exec.exec('ruby', ['--version'])) + if (inputs['rubygems'] !== 'default') { await common.measure('Updating RubyGems', async () => rubygems.rubygemsUpdate(inputs['rubygems'], rubyPrefix))