Skip to content
Browse files

Fix test-path error on empty strings when some VS modules aren't inst…

…alled
  • Loading branch information...
1 parent 7d8c257 commit ebcb12293eda140d98ced3274ab7d8d7c60cf8e0 @tomasr committed Oct 16, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 scripts/vs2010.ps1
View
4 scripts/vs2010.ps1
@@ -18,7 +18,7 @@ function Prepend-IfExists {
[string] $envVar = "PATH"
)
$oldPath = $_env[$envVar]
- if (($newPath -ne $null) -and (test-path $newPath)) {
+ if ((-not [String]::IsNullOrEmpty($newPath)) -and (test-path $newPath)) {
if ($oldPath -ne $null) { $newPath = $newPath + ";" + $oldPath }
$_env[$envVar] = $newPath
}
@@ -59,7 +59,7 @@ if (($VsInstallDir -ne $null) -and (test-path $VsInstallDir)) {
Prepend-IfExists ($VcInstallDir + "bin") "PATH"
Prepend-IfExists ($VsInstallDir + "Common7\IDE") "PATH"
Prepend-IfExists ($VsInstallDir + "VSTSDB\Deploy") "PATH"
- Prepend-IfExists ($FSharpInstallDir) "PATH"
+ #Prepend-IfExists ($FSharpInstallDir) "PATH"
Prepend-IfExists ($VcInstallDir + "ATLMFC\INCLUDE") "INCLUDE"
Prepend-IfExists ($VcInstallDir + "INCLUDE") "INCLUDE"

0 comments on commit ebcb122

Please sign in to comment.
Something went wrong with that request. Please try again.