Skip to content

Commit

Permalink
Change check for IsWindows so it doesn't gen error record
Browse files Browse the repository at this point in the history
Fix #234
  • Loading branch information
rkeithhill committed Nov 23, 2017
1 parent 000e586 commit adf580e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build/tools.ps1
Expand Up @@ -57,7 +57,7 @@ function Install-Dotnet {
bash ./$installScript -c $Channel -v $Version
}
}
elseif ($IsWindows -or ($PSVersionTable.PSVersion -lt '6.0.0')) {
elseif (!(Test-Path Variable:\IsWindows) -or $IsWindows) {
Remove-Item -ErrorAction SilentlyContinue -Recurse -Force ~\AppData\Local\Microsoft\dotnet
$installScript = "dotnet-install.ps1"
Invoke-WebRequest -Uri $obtainUrl/$installScript -OutFile $installScript
Expand Down
2 changes: 1 addition & 1 deletion src/private/ConfigureBuildEnvironment.ps1
@@ -1,6 +1,6 @@

function ConfigureBuildEnvironment {
if (!(Get-Variable -Name IsWindows -ErrorAction SilentlyContinue) -or $IsWindows) {
if (!(Test-Path Variable:\IsWindows) -or $IsWindows) {
$framework = $psake.context.peek().config.framework
if ($framework -cmatch '^((?:\d+\.\d+)(?:\.\d+){0,1})(x86|x64){0,1}$') {
$versionPart = $matches[1]
Expand Down

0 comments on commit adf580e

Please sign in to comment.