Skip to content

Commit

Permalink
(GH-667) Provide How To Add Profile Manually
Browse files Browse the repository at this point in the history
When adding the profile fails, provide advice on how to add it manually.
  • Loading branch information
ferventcoder committed Mar 26, 2016
1 parent 480cf4b commit 4d7ad22
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions nuget/chocolatey/tools/chocolateysetup.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,15 @@ if (Test-Path($ChocolateyProfile)) {

} catch {
Write-ChocolateyWarning "Unable to add Chocolatey to the profile. You will need to do it manually. Error was '$_'"
@'
This is how add the Chocolatey Profile manually.
Find your $profile. Then add the following lines to it:
$ChocolateyProfile = "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
if (Test-Path($ChocolateyProfile)) {
Import-Module "$ChocolateyProfile"
}
'@ | Write-Output
}
}

Expand Down

0 comments on commit 4d7ad22

Please sign in to comment.