mirror of
https://github.com/ruby/setup-ruby.git
synced 2026-09-13 14:34:21 +02:00
Install Bundler if needed on Windows
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
// Most of this logic is from
|
||||
// https://github.com/MSP-Greg/actions-ruby/blob/master/lib/main.js
|
||||
|
||||
const fs = require('fs')
|
||||
const core = require('@actions/core')
|
||||
const exec = require('@actions/exec')
|
||||
const tc = require('@actions/tool-cache')
|
||||
@@ -26,6 +27,10 @@ export async function downloadExtractAndSetPATH(ruby) {
|
||||
const newPath = setupPath(msys2, rubyPrefix)
|
||||
core.exportVariable('PATH', newPath)
|
||||
|
||||
if (!fs.existsSync(`${rubyPrefix}\\bin\\bundle.cmd`)) {
|
||||
await exec.exec(`${rubyPrefix}\\bin\\gem install bundler --no-document`)
|
||||
}
|
||||
|
||||
return rubyPrefix
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user