From 55dff253ca3d47ace252e56aa5a0cdfc2f65af45 Mon Sep 17 00:00:00 2001 From: Benoit Daloze Date: Sun, 9 Feb 2020 21:56:15 +0100 Subject: [PATCH] Do not remove any dev tools from PATH on Windows * This might lead to more conflicts, but the flip side of a setup action removing capabilities seems worse and unexpected. * See https://github.com/ruby/setup-ruby/issues/19 --- dist/index.js | 5 +---- windows.js | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/dist/index.js b/dist/index.js index 7b5f730be..098cd76ed 100644 --- a/dist/index.js +++ b/dist/index.js @@ -7932,9 +7932,6 @@ function setupPath(msys2, rubyPrefix) { const originalPath = process.env['PATH'].split(';') let path = originalPath.slice() - // Remove conflicting dev tools from PATH - path = path.filter(e => !e.match(/\b(Chocolatey|CMake|mingw64|OpenSSL|Strawberry)\b/)) - // Remove default Ruby in PATH path = path.filter(e => !e.match(/\bRuby\b/)) @@ -7946,7 +7943,7 @@ function setupPath(msys2, rubyPrefix) { // Add the downloaded Ruby in PATH path.unshift(`${rubyPrefix}\\bin`) - console.log("Entries removed from PATH to avoid conflicts with MSYS2 and Ruby:") + console.log("Entries removed from PATH to avoid conflicts with Ruby:") for (const entry of originalPath) { if (!path.includes(entry)) { console.log(entry) diff --git a/windows.js b/windows.js index 8ae031f23..586851218 100644 --- a/windows.js +++ b/windows.js @@ -65,9 +65,6 @@ export function setupPath(msys2, rubyPrefix) { const originalPath = process.env['PATH'].split(';') let path = originalPath.slice() - // Remove conflicting dev tools from PATH - path = path.filter(e => !e.match(/\b(Chocolatey|CMake|mingw64|OpenSSL|Strawberry)\b/)) - // Remove default Ruby in PATH path = path.filter(e => !e.match(/\bRuby\b/)) @@ -79,7 +76,7 @@ export function setupPath(msys2, rubyPrefix) { // Add the downloaded Ruby in PATH path.unshift(`${rubyPrefix}\\bin`) - console.log("Entries removed from PATH to avoid conflicts with MSYS2 and Ruby:") + console.log("Entries removed from PATH to avoid conflicts with Ruby:") for (const entry of originalPath) { if (!path.includes(entry)) { console.log(entry)