From 4d7ad228737fbf82d82a3ab87862ec4566919330 Mon Sep 17 00:00:00 2001 From: Rob Reynolds Date: Sat, 26 Mar 2016 17:40:10 -0500 Subject: [PATCH] (GH-667) Provide How To Add Profile Manually When adding the profile fails, provide advice on how to add it manually. --- nuget/chocolatey/tools/chocolateysetup.psm1 | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/nuget/chocolatey/tools/chocolateysetup.psm1 b/nuget/chocolatey/tools/chocolateysetup.psm1 index c5d39822a5..18424be4f3 100644 --- a/nuget/chocolatey/tools/chocolateysetup.psm1 +++ b/nuget/chocolatey/tools/chocolateysetup.psm1 @@ -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 } }