Skip to content

Commit

Permalink
Do not remove any dev tools from PATH on Windows
Browse files Browse the repository at this point in the history
* This might lead to more conflicts, but the flip side of a setup action
  removing capabilities seems worse and unexpected.
* See #19
  • Loading branch information
eregon committed Feb 9, 2020
1 parent e15ecc8 commit 55dff25
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
5 changes: 1 addition & 4 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 1 addition & 4 deletions windows.js
Original file line number Diff line number Diff line change
Expand Up @@ -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/))

Expand All @@ -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)
Expand Down

0 comments on commit 55dff25

Please sign in to comment.