Skip to content

Instantly share code, notes, and snippets.

@ACEfanatic02
Created October 30, 2014 04:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ACEfanatic02/a149d3675d3673b84796 to your computer and use it in GitHub Desktop.
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.
$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