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

Add cmdlet for acquiring paths set in environment variables that should not be used directly #2860

Closed
AdmiringWorm opened this issue Oct 18, 2022 · 1 comment
Assignees
Milestone

Comments

@AdmiringWorm
Copy link
Member

Is Your Feature Request Related To A Problem? Please describe.

Some time ago we started disallowing the use of certain private environment variables when packages are pushed to Chocolatey Community Repository (such as the package folder), this leaves users without an easy way to get the information about these paths easily.

Describe The Solution. Why is it needed?

We should add a new chocolatey helper script that can be used to get paths to folders that we allow users to use, but do not allow to be used through environment variables. Such as ChocolateyPackageFolder environment variable.
We should implement this as a generic helper, where the user needs to specify which type of folder path they are interested in.

Additional Context.

N/A.

Related Issues

N/A

@AdmiringWorm AdmiringWorm self-assigned this Oct 18, 2022
AdmiringWorm added a commit to AdmiringWorm/choco that referenced this issue Oct 18, 2022
This commit adds a new PowerShell helper to Chocolatey CLI
that allows maintainers to acquire the paths that we have stored
as private/internal environment variables.

This allows maintainers to still make use of these variables through
this new helper while still retaining the ability to push the package
to Chocolatey Community Repository.
AdmiringWorm added a commit to AdmiringWorm/choco that referenced this issue Oct 18, 2022
AdmiringWorm added a commit to AdmiringWorm/choco that referenced this issue Oct 18, 2022
@AdmiringWorm AdmiringWorm added this to the 1.2.0 milestone Oct 19, 2022
AdmiringWorm added a commit to AdmiringWorm/choco that referenced this issue Oct 19, 2022
This commit adds a new PowerShell helper to Chocolatey CLI
that allows maintainers to acquire the paths that we have stored
as private/internal environment variables.

This allows maintainers to still make use of these variables through
this new helper while still retaining the ability to push the package
to Chocolatey Community Repository.
AdmiringWorm added a commit to AdmiringWorm/choco that referenced this issue Oct 19, 2022
AdmiringWorm added a commit to AdmiringWorm/choco that referenced this issue Oct 19, 2022
This commit adds a new PowerShell helper to Chocolatey CLI
that allows maintainers to acquire the paths that we have stored
as private/internal environment variables.

This allows maintainers to still make use of these variables through
this new helper while still retaining the ability to push the package
to Chocolatey Community Repository.
AdmiringWorm added a commit to AdmiringWorm/choco that referenced this issue Oct 19, 2022
AdmiringWorm added a commit to AdmiringWorm/choco that referenced this issue Oct 19, 2022
This commit adds a new PowerShell helper to Chocolatey CLI
that allows maintainers to acquire the paths that we have stored
as private/internal environment variables.

This allows maintainers to still make use of these variables through
this new helper while still retaining the ability to push the package
to Chocolatey Community Repository.
AdmiringWorm added a commit to AdmiringWorm/choco that referenced this issue Oct 19, 2022
@AdmiringWorm AdmiringWorm changed the title Add cmdlet for acquiring paths set in environment variables that should no be used Add cmdlet for acquiring paths set in environment variables that should not be used directly Oct 19, 2022
gep13 added a commit that referenced this issue Oct 19, 2022
(#2860) Add new PowerShell helper function for acquiring paths from private variables
AdmiringWorm added a commit to AdmiringWorm/choco that referenced this issue Oct 19, 2022
* release/1.2.0: (374 commits)
  (maint) Add incoming arguments available in Licensed Extension
  (chocolatey#798) Add missing pin option in tab completion
  (chocolatey#2860) Add e2e tests for new PS cmdlet
  (maint) Fix Chocolatey path in docs generation
  (chocolatey#2860) Add new PS helper to get maintainer specific paths
  (chocolatey#2816) Update to latest Chocolatey NuGet.Core
  (chocolatey#2693) Re-add old resolve or load method
  (chocolatey#886) Update packages.config install logging
  (chocolatey#1185) Always pass in hook scripts event if empty
  Update tests/chocolatey-tests/commands/choco-outdated.Tests.ps1
  (chocolatey#2801) Pin Chocolatey packages for outdated tests
  (chocolatey#886) Use specific strings for configurations
  (chocolatey#886) Add Pester tests for packages.config
  (chocolatey#886) Debug log Package configuration
  (chocolatey#1185) Be explicit with expected exit codes
  (maint) Pester test directory structure shuffle
  (chocolatey#1185) Add tests for hook scripts
  (maint) Minor formatting change
  (chocolatey#798) Add tests for pinning package on install
  (chocolatey#2787) Restore Chocolatey snapshot before sxs
  ...
@AdmiringWorm
Copy link
Member Author

🎉 This issue has been resolved in version 1.2.0 🎉

The release is available on:

Your GitReleaseManager bot 📦🚀

AdmiringWorm added a commit that referenced this issue Oct 20, 2022
* master:
  (maint) Add incoming arguments available in Licensed Extension
  (#798) Add missing pin option in tab completion
  (#2860) Add e2e tests for new PS cmdlet
  (maint) Fix Chocolatey path in docs generation
  (#2860) Add new PS helper to get maintainer specific paths
  (#2816) Update to latest Chocolatey NuGet.Core
  (#2693) Re-add old resolve or load method
  (#886) Update packages.config install logging
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant