From 8efeb6a80625b23729078908a84a43317f9ed8db Mon Sep 17 00:00:00 2001 From: Adam Ralph Date: Tue, 24 Feb 2015 06:52:42 +0100 Subject: [PATCH] fix install script for choco < v0.9.8.33 --- build/ScriptCs.Version.props | 2 +- src/ScriptCs/Properties/chocolateyInstall.ps1 | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build/ScriptCs.Version.props b/build/ScriptCs.Version.props index 531a722b..2cc6a782 100644 --- a/build/ScriptCs.Version.props +++ b/build/ScriptCs.Version.props @@ -5,7 +5,7 @@ 0 13 - 2 + 3 diff --git a/src/ScriptCs/Properties/chocolateyInstall.ps1 b/src/ScriptCs/Properties/chocolateyInstall.ps1 index e2ea4279..3e48a5ad 100644 --- a/src/ScriptCs/Properties/chocolateyInstall.ps1 +++ b/src/ScriptCs/Properties/chocolateyInstall.ps1 @@ -35,12 +35,12 @@ # https://github.com/chocolatey/chocolatey/issues/97 $envPath = $env:PATH if ($envPath.ToLower().Contains($_.ToLower())) { - $userPath = Get-EnvironmentVariable -Name 'Path' -Scope "User" + $userPath = [Environment]::GetEnvironmentVariable("Path","User") if($userPath) { $actualPath = [System.Collections.ArrayList]($userPath).Split(";") $actualPath.Remove($_) $newPath = $actualPath -Join ";" - Set-EnvironmentVariable -Name 'Path' -Value $newPath -Scope "User" + [Environment]::SetEnvironmentVariable("Path", $newPath, "User") } }