Skip to content

Commit

Permalink
(GH-729) Update env after setting env vars for scripts
Browse files Browse the repository at this point in the history
When setting environment variables, update the session's environment
variables so that those variables can be used immediately in the
currently running PowerShell script.
  • Loading branch information
ferventcoder committed May 9, 2016
1 parent 8734611 commit 0fdfd4d
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,6 @@ function Set-EnvironmentVariable([string] $Name, [string] $Value, [System.Enviro
}

[Microsoft.Win32.Registry]::SetValue($keyHive + "\" + $registryKey, $Name, $Value, $registryType)

Update-SessionEnvironment
}

0 comments on commit 0fdfd4d

Please sign in to comment.