From 2641afc25c2faa1481a8effc5258a819a83dc7d7 Mon Sep 17 00:00:00 2001 From: MSP-Greg Date: Sun, 29 Mar 2020 17:07:02 -0500 Subject: [PATCH] Windows MSYS - move install to ssd drive --- dist/index.js | 8 ++++---- windows.js | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/dist/index.js b/dist/index.js index 761cd5f..ea917a1 100644 --- a/dist/index.js +++ b/dist/index.js @@ -4807,6 +4807,9 @@ const exec = __webpack_require__(986) const tc = __webpack_require__(533) const rubyInstallerVersions = __webpack_require__(471).versions +// Extract to SSD, see https://github.com/ruby/setup-ruby/pull/14 +const drive = (process.env['GITHUB_WORKSPACE'] || 'C')[0] + // needed for 2.2, 2.3, and mswin, cert file used by Git for Windows const certFile = 'C:\\Program Files\\Git\\mingw64\\ssl\\cert.pem' @@ -4815,7 +4818,7 @@ const msys2 = 'C:\\msys64' const msys2PathEntries = [`${msys2}\\mingw64\\bin`, `${msys2}\\usr\\bin`] // location & path for old RubyInstaller DevKit (MSYS), Ruby 2.2 and 2.3 -const msys = 'C:\\DevKit64' +const msys = `${drive}:\\DevKit64` const msysPathEntries = [`${msys}\\mingw\\x86_64-w64-mingw32\\bin`, `${msys}\\mingw\\bin`, `${msys}\\bin`] @@ -4837,9 +4840,6 @@ async function install(platform, ruby) { } const base = url.slice(url.lastIndexOf('/') + 1, url.length - '.7z'.length) - // Extract to SSD, see https://github.com/ruby/setup-ruby/pull/14 - const drive = (process.env['GITHUB_WORKSPACE'] || 'C')[0] - const downloadPath = await tc.downloadTool(url) await exec.exec('7z', ['x', downloadPath, `-xr!${base}\\share\\doc`, `-o${drive}:\\`], { silent: true }) const rubyPrefix = `${drive}:\\${base}` diff --git a/windows.js b/windows.js index 245ba1d..0f5b52a 100644 --- a/windows.js +++ b/windows.js @@ -8,6 +8,9 @@ const exec = require('@actions/exec') const tc = require('@actions/tool-cache') const rubyInstallerVersions = require('./windows-versions').versions +// Extract to SSD, see https://github.com/ruby/setup-ruby/pull/14 +const drive = (process.env['GITHUB_WORKSPACE'] || 'C')[0] + // needed for 2.2, 2.3, and mswin, cert file used by Git for Windows const certFile = 'C:\\Program Files\\Git\\mingw64\\ssl\\cert.pem' @@ -16,7 +19,7 @@ const msys2 = 'C:\\msys64' const msys2PathEntries = [`${msys2}\\mingw64\\bin`, `${msys2}\\usr\\bin`] // location & path for old RubyInstaller DevKit (MSYS), Ruby 2.2 and 2.3 -const msys = 'C:\\DevKit64' +const msys = `${drive}:\\DevKit64` const msysPathEntries = [`${msys}\\mingw\\x86_64-w64-mingw32\\bin`, `${msys}\\mingw\\bin`, `${msys}\\bin`] @@ -38,9 +41,6 @@ export async function install(platform, ruby) { } const base = url.slice(url.lastIndexOf('/') + 1, url.length - '.7z'.length) - // Extract to SSD, see https://github.com/ruby/setup-ruby/pull/14 - const drive = (process.env['GITHUB_WORKSPACE'] || 'C')[0] - const downloadPath = await tc.downloadTool(url) await exec.exec('7z', ['x', downloadPath, `-xr!${base}\\share\\doc`, `-o${drive}:\\`], { silent: true }) const rubyPrefix = `${drive}:\\${base}`