Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(GH-667) PowerShell Custom Host - Set $Profile
When running a custom host, it appears all automatic variables are set but `$profile`. It is empty for all the different profiles. When the profile value is empty and the documents folder exists for the user, set `$profile` to a string value that represents what it would have been set to in a normal PowerShell scenario. We can get away with a single value for `$profile` as most scripts do not look at each of the profiles, only what is returned by the `$profile` string, which is `CurrentUserCurrentHost`. We check for the existence of the documents folder because it tells us that this is not the LocalSystem user, and we don't want to set `$profile` when the SYSTEM user is running choco.
- Loading branch information