From 4d7199dbd02325086f28e5c30bc65e81ff6df6f3 Mon Sep 17 00:00:00 2001 From: MSP-Greg Date: Thu, 30 Jan 2020 13:39:59 -0600 Subject: [PATCH] Use SSD drive for Windows Ruby location --- dist/index.js | 6 ++++-- windows.js | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/dist/index.js b/dist/index.js index 0f20f6c..bb52da8 100644 --- a/dist/index.js +++ b/dist/index.js @@ -4826,9 +4826,11 @@ async function install(platform, ruby) { } const base = url.slice(url.lastIndexOf('/') + 1, url.length - '.7z'.length) + const drv = (process.env['GITHUB_WORKSPACE'] || 'C')[0] + const downloadPath = await tc.downloadTool(url) - await exec.exec(`7z x ${downloadPath} -xr!${base}\\share\\doc -oC:\\`) - const rubyPrefix = `C:\\${base}` + await exec.exec(`7z x ${downloadPath} -xr!${base}\\share\\doc -o${drv}:\\`) + const rubyPrefix = `${drv}:\\${base}` const [hostedRuby, msys2] = await linkMSYS2() const newPath = setupPath(msys2, rubyPrefix) diff --git a/windows.js b/windows.js index 6c30736..dd63ead 100644 --- a/windows.js +++ b/windows.js @@ -25,9 +25,11 @@ export async function install(platform, ruby) { } const base = url.slice(url.lastIndexOf('/') + 1, url.length - '.7z'.length) + const drv = (process.env['GITHUB_WORKSPACE'] || 'C')[0] + const downloadPath = await tc.downloadTool(url) - await exec.exec(`7z x ${downloadPath} -xr!${base}\\share\\doc -oC:\\`) - const rubyPrefix = `C:\\${base}` + await exec.exec(`7z x ${downloadPath} -xr!${base}\\share\\doc -o${drv}:\\`) + const rubyPrefix = `${drv}:\\${base}` const [hostedRuby, msys2] = await linkMSYS2() const newPath = setupPath(msys2, rubyPrefix)