{"action":"created","issue":{"url":"https://api.github.com/repos/PowerShell/PowerShellGet/issues/81","repository_url":"https://api.github.com/repos/PowerShell/PowerShellGet","labels_url":"https://api.github.com/repos/PowerShell/PowerShellGet/issues/81/labels{/name}","comments_url":"https://api.github.com/repos/PowerShell/PowerShellGet/issues/81/comments","events_url":"https://api.github.com/repos/PowerShell/PowerShellGet/issues/81/events","html_url":"https://github.com/PowerShell/PowerShellGet/issues/81","id":196767130,"number":81,"title":"Install-Script -Scope CurrentUser should make permanent changes to $env:PATH","user":{"login":"NReilingh","id":2458645,"avatar_url":"https://avatars.githubusercontent.com/u/2458645?v=3","gravatar_id":"","url":"https://api.github.com/users/NReilingh","html_url":"https://github.com/NReilingh","followers_url":"https://api.github.com/users/NReilingh/followers","following_url":"https://api.github.com/users/NReilingh/following{/other_user}","gists_url":"https://api.github.com/users/NReilingh/gists{/gist_id}","starred_url":"https://api.github.com/users/NReilingh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NReilingh/subscriptions","organizations_url":"https://api.github.com/users/NReilingh/orgs","repos_url":"https://api.github.com/users/NReilingh/repos","events_url":"https://api.github.com/users/NReilingh/events{/privacy}","received_events_url":"https://api.github.com/users/NReilingh/received_events","type":"User","site_admin":false},"labels":[{"id":459675651,"url":"https://api.github.com/repos/PowerShell/PowerShellGet/labels/Issue-Discussion","name":"Issue-Discussion","color":"fc2929","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-12-20T20:03:21Z","updated_at":"2016-12-21T20:54:45Z","closed_at":null,"body":"When running Install-Script with a -Scope of CurrentUser, psget checks to make sure that the user's Documents\\WindowsPowerShell\\Scripts folder is in the PATH, and if it's not, offers to add it.\r\n\r\n## Expected Behavior\r\nSince the user is installing a script with powershellget, they should assume that being prompted about a change to their path enabling them to easily run the script will be permanent and work in future powershell sessions.\r\n\r\n## Current Behavior\r\npsget only changes the $env:PATH for the current process. This means the change is effective immediately for the current session, but opening a new powershell window will not have the path change.\r\n\r\n## Possible Solution\r\nAfter Install-Script prompts the user to affirm a change to $env:PATH, it should make a permanent change to the current user's PATH that will persist for future sessions without requiring the user to make this change manually or add something to their $profile.\r\n\r\n## Your Environment\r\n<!--- Include at least the output from $PSVersionTable -->\r\n\r\n```PowerShell\r\n\r\nName                           Value\r\n----                           -----\r\nPSVersion                      5.1.14393.576\r\nPSEdition                      Desktop\r\nPSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}\r\nBuildVersion                   10.0.14393.576\r\nCLRVersion                     4.0.30319.42000\r\nWSManStackVersion              3.0\r\nPSRemotingProtocolVersion      2.3\r\nSerializationVersion           1.1.0.1\r\n\r\nModuleType Version    Name                                ExportedCommands\r\n---------- -------    ----                                ----------------\r\nBinary     1.0.0.1    PackageManagement                   {Find-Package, Get-Package, Get-PackageProvider, Get-PackageSource...}\r\nScript     1.0.0.1    PowerShellGet                       {Install-Module, Find-Module, Save-Module, Update-Module...}\r\n```"},"comment":{"url":"https://api.github.com/repos/PowerShell/PowerShellGet/issues/comments/268636829","html_url":"https://github.com/PowerShell/PowerShellGet/issues/81#issuecomment-268636829","issue_url":"https://api.github.com/repos/PowerShell/PowerShellGet/issues/81","id":268636829,"user":{"login":"bmanikm","id":5000058,"avatar_url":"https://avatars.githubusercontent.com/u/5000058?v=3","gravatar_id":"","url":"https://api.github.com/users/bmanikm","html_url":"https://github.com/bmanikm","followers_url":"https://api.github.com/users/bmanikm/followers","following_url":"https://api.github.com/users/bmanikm/following{/other_user}","gists_url":"https://api.github.com/users/bmanikm/gists{/gist_id}","starred_url":"https://api.github.com/users/bmanikm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bmanikm/subscriptions","organizations_url":"https://api.github.com/users/bmanikm/orgs","repos_url":"https://api.github.com/users/bmanikm/repos","events_url":"https://api.github.com/users/bmanikm/events{/privacy}","received_events_url":"https://api.github.com/users/bmanikm/received_events","type":"User","site_admin":false},"created_at":"2016-12-21T20:54:45Z","updated_at":"2016-12-21T20:54:45Z","body":"@NReilingh Could you please elaborate on why ';;' in PATH value is causing the issue? Windows should ignore the empty entries in PATH value.\r\n\r\nWhat is your OS?\r\n\r\nCan you please provide the output of following commands from a new PS Console on your machine?\r\n\r\n```powershell\r\n# Open a new PS Console\r\ndel \"$env:LOCALAPPDATA\\Microsoft\\Windows\\PowerShell\\PowerShellGet\\PowerShellGetSettings.xml\" -force\r\n\r\n[System.Environment]::GetEnvironmentVariable('PATH', [System.EnvironmentVariableTarget]::Process)\r\n[System.Environment]::GetEnvironmentVariable('PATH', [System.EnvironmentVariableTarget]::User)\r\n[System.Environment]::GetEnvironmentVariable('PATH', [System.EnvironmentVariableTarget]::Machine)\r\n$env:PATH\r\n\r\nInstall-Script -Verbose -Debug -Scope CurrentUser -Name $ScriptName\r\n\r\n[System.Environment]::GetEnvironmentVariable('PATH', [System.EnvironmentVariableTarget]::Process)\r\n[System.Environment]::GetEnvironmentVariable('PATH', [System.EnvironmentVariableTarget]::User)\r\n[System.Environment]::GetEnvironmentVariable('PATH', [System.EnvironmentVariableTarget]::Machine)\r\n$env:PATH\r\n\r\n```\r\n\r\nNow open a new PS Console and get the output of following commands.\r\n\r\n```powershell\r\n# Open a new PS Console\r\n[System.Environment]::GetEnvironmentVariable('PATH', [System.EnvironmentVariableTarget]::Process)\r\n[System.Environment]::GetEnvironmentVariable('PATH', [System.EnvironmentVariableTarget]::User)\r\n[System.Environment]::GetEnvironmentVariable('PATH', [System.EnvironmentVariableTarget]::Machine)\r\n$env:PATH\r\n\r\n```\r\n"}}
{"actor":{"display_login":"bmanikm"}}