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
This commit is contained in:
+1
-4
@@ -7932,9 +7932,6 @@ function setupPath(msys2, rubyPrefix) {
|
|||||||
const originalPath = process.env['PATH'].split(';')
|
const originalPath = process.env['PATH'].split(';')
|
||||||
let path = originalPath.slice()
|
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
|
// Remove default Ruby in PATH
|
||||||
path = path.filter(e => !e.match(/\bRuby\b/))
|
path = path.filter(e => !e.match(/\bRuby\b/))
|
||||||
|
|
||||||
@@ -7946,7 +7943,7 @@ function setupPath(msys2, rubyPrefix) {
|
|||||||
// Add the downloaded Ruby in PATH
|
// Add the downloaded Ruby in PATH
|
||||||
path.unshift(`${rubyPrefix}\\bin`)
|
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) {
|
for (const entry of originalPath) {
|
||||||
if (!path.includes(entry)) {
|
if (!path.includes(entry)) {
|
||||||
console.log(entry)
|
console.log(entry)
|
||||||
|
|||||||
+1
-4
@@ -65,9 +65,6 @@ export function setupPath(msys2, rubyPrefix) {
|
|||||||
const originalPath = process.env['PATH'].split(';')
|
const originalPath = process.env['PATH'].split(';')
|
||||||
let path = originalPath.slice()
|
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
|
// Remove default Ruby in PATH
|
||||||
path = path.filter(e => !e.match(/\bRuby\b/))
|
path = path.filter(e => !e.match(/\bRuby\b/))
|
||||||
|
|
||||||
@@ -79,7 +76,7 @@ export function setupPath(msys2, rubyPrefix) {
|
|||||||
// Add the downloaded Ruby in PATH
|
// Add the downloaded Ruby in PATH
|
||||||
path.unshift(`${rubyPrefix}\\bin`)
|
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) {
|
for (const entry of originalPath) {
|
||||||
if (!path.includes(entry)) {
|
if (!path.includes(entry)) {
|
||||||
console.log(entry)
|
console.log(entry)
|
||||||
|
|||||||
Reference in New Issue
Block a user