@@ -78,16 +78,17 @@ export async function setupRuby(options = {}) {
7878 await inputs [ 'afterSetupPathHook' ] ( { platform, rubyPrefix, engine, version } )
7979 }
8080
81- if ( inputs [ 'bundler' ] !== 'none' ) {
82- const [ gemfile , lockFile ] = bundler . detectGemfiles ( )
81+ const [ gemfile , lockFile ] = bundler . detectGemfiles ( )
82+ let bundlerVersion = "unknown"
8383
84- const bundlerVersion = await common . measure ( 'Installing Bundler' , async ( ) =>
84+ if ( inputs [ 'bundler' ] !== 'none' ) {
85+ bundlerVersion = await common . measure ( 'Installing Bundler' , async ( ) =>
8586 bundler . installBundler ( inputs [ 'bundler' ] , lockFile , platform , rubyPrefix , engine , version ) )
87+ }
8688
87- if ( inputs [ 'bundler-cache' ] === 'true' ) {
88- await common . measure ( 'bundle install' , async ( ) =>
89- bundler . bundleInstall ( gemfile , lockFile , platform , engine , version , bundlerVersion , inputs [ 'cache-version' ] ) )
90- }
89+ if ( inputs [ 'bundler-cache' ] === 'true' ) {
90+ await common . measure ( 'bundle install' , async ( ) =>
91+ bundler . bundleInstall ( gemfile , lockFile , platform , engine , version , bundlerVersion , inputs [ 'cache-version' ] ) )
9192 }
9293
9394 core . setOutput ( 'ruby-prefix' , rubyPrefix )
0 commit comments