Created
October 30, 2014 04:51
-
-
Save ACEfanatic02/a149d3675d3673b84796 to your computer and use it in GitHub Desktop.
Powershell script to sanitize $ENV:PATH so that existing MinGW install doesn't interfere with Rust.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$mingwPath = "C:\MinGW\bin" # Replace with MinGW path from $ENV:PATH | |
$pathArray = $ENV:PATH.Split(";") | |
$newPath = "" | |
Foreach ($p in $pathArray) { | |
if (!$p.Equals($mingwPath)) { | |
$newPath += ";" | |
$newPath += $p | |
} | |
} | |
$ENV:PATH = $newPath |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment