Skip to content

Commit

Permalink
fix #278 not invoking method on nonexistent env variable data
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Wrock <[email protected]>
  • Loading branch information
mwrock committed Jul 27, 2017
1 parent 2e8aca8 commit abc9ff6
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions BuildScripts/setup.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ function PersistBoxStarterPathToEnvironmentVariable($variableName, $boxstarterPa
$userValues = [environment]::getfolderpath("mydocuments")
$userValues +="\WindowsPowerShell\Modules"
}
$userValues = $userValues.Replace(';;',';')
[Environment]::SetEnvironmentVariable($variableName, $userValues, 'User')

$value = [Environment]::GetEnvironmentVariable($variableName, 'Machine')
Expand All @@ -118,7 +117,6 @@ function PersistBoxStarterPathToEnvironmentVariable($variableName, $boxstarterPa
$values ="$boxstarterPath"
}

$values = $values.Replace(';;',';')
[Environment]::SetEnvironmentVariable($variableName, $values, 'Machine')
$varValue = Get-Content env:\$variableName
$varValue = "$boxstarterPath;$varValue"
Expand Down

0 comments on commit abc9ff6

Please sign in to comment.