Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation of Chocolatey should add a more descriptive comment when adding Chocolatey tab-completion module to profile #2443

Closed
vexx32 opened this issue Nov 9, 2021 · 0 comments · Fixed by #2611 or #2654
Assignees
Labels
5 - Released Improvement IN REGRESSION TEST SUITE These are things that are handled by tools like Test-Kitchen
Milestone

Comments

@vexx32
Copy link
Member

vexx32 commented Nov 9, 2021

What You Are Seeing?

When installing Chocolatey, the choco installer code below automatically inserts the quoted code to a profile, including a comment that is essentially redundant and somewhat misleading:

$profileInstall = @'
# Chocolatey profile
$ChocolateyProfile = "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
if (Test-Path($ChocolateyProfile)) {
Import-Module "$ChocolateyProfile"
}
'@

What is Expected?

Comment should mention that the module load enables Chocolatey tab completion, so users know what it's actually doing and don't remove it without knowing what they're disabling.

Quote from a user:

legit always thought "wtf is a chocolatey profile" and deleted it
(...)
I thought it was like
a profile that choco loads to do something
like on choco invoke

I would suggest the comment should read something along the lines of:

# This module contains the necessary code for tab-completions to function for `choco`.
# Be aware that if you are missing these lines from your profile, tab completion for choco
# will not function. See https://docs.chocolatey.org/en-us/troubleshooting#why-does-choco-intab-not-work-for-me
# for details.

We should create a shortlink to the doc to be used here instead of the long link, but you get the idea. 🙂

How Did You Get This To Happen? (Steps to Reproduce)

Run the Chocolatey install script.

Output Log

N/A

@pauby pauby added this to the 1.0.0 milestone Feb 11, 2022
@corbob corbob added the ADD AUTO TESTS Things that typically go to Test-Kitchen - once completed, IN REGRESSION TEST SUITE label added label Mar 1, 2022
@AdmiringWorm AdmiringWorm self-assigned this Mar 3, 2022
AdmiringWorm added a commit to AdmiringWorm/choco that referenced this issue Mar 3, 2022
This commit updates the injection of importing the chocolatey
profile to include extra comment details to mention what the
import of the module is used for.
AdmiringWorm added a commit to AdmiringWorm/choco that referenced this issue Mar 3, 2022
This commit updates the injection of importing the chocolatey
profile to include extra comment details to mention what the
import of the module is used for.
gep13 pushed a commit to AdmiringWorm/choco that referenced this issue Mar 7, 2022
This commit updates the injection of importing the chocolatey
profile to include extra comment details to mention what the
import of the module is used for.
gep13 pushed a commit to AdmiringWorm/choco that referenced this issue Mar 7, 2022
This commit updates the injection of importing the chocolatey
profile to include extra comment details to mention what the
import of the module is used for.
gep13 added a commit that referenced this issue Mar 7, 2022
…a-more-descriptive-comment-when-adding-Chocolatey-tab-completion-module-to-profile

(#2443) Update comment about chocolatey profile
@gep13 gep13 added 4 - Done and removed 3 - Review labels Mar 7, 2022
@corbob corbob added IN REGRESSION TEST SUITE These are things that are handled by tools like Test-Kitchen and removed ADD AUTO TESTS Things that typically go to Test-Kitchen - once completed, IN REGRESSION TEST SUITE label added labels Mar 9, 2022
vexx32 added a commit to vexx32/choco that referenced this issue Mar 14, 2022
@gep13 gep13 linked a pull request Mar 15, 2022 that will close this issue
10 tasks
gep13 pushed a commit to vexx32/choco that referenced this issue Mar 15, 2022
gep13 added a commit that referenced this issue Mar 15, 2022
(#2443) Fix misspellings for profile text
@gep13 gep13 changed the title Installer should add a more descriptive comment when adding Chocolatey tab-completion module to profile Installation of Chocolatey should add a more descriptive comment when adding Chocolatey tab-completion module to profile Mar 18, 2022
gep13 added a commit that referenced this issue Mar 18, 2022
* release/1.0.0: (65 commits)
  (version) v1.0.0
  (#2443) Fix misspellings for profile text
  (#2468) Remove choco update command
  (#2468) Remove choco version command
  (#2602) Add 1.0.0 of shimgen and update shims
  (#89) Remove cpack shims on package upgrades
  (#89) Remove cpack shim for choco pack
  (maint) Update deprecation notice for config settings
  (build) Additional tweaks to version numbers
  (build) Add SolutionVersion.cs file to artifacts
  (docs) Update committers docs with correct/fixed links
  (build) Minor tweaks to build files
  (#2615) Reference CREDITS file for other licenses
  (build) Refactor Nuget Upload
  (build) Added missing Kotlin import
  (maint) Whitespace
  (#2614) Update 7zip / Shimgen licenses
  (#2614) Update project  contributors
  (#2641) Minor tweaks to wording and formatting
  (#2462) Remove mention of alias for search comand
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5 - Released Improvement IN REGRESSION TEST SUITE These are things that are handled by tools like Test-Kitchen
Projects
None yet
5 participants