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

(#1901) Display software installation location #3317

Merged
merged 2 commits into from Apr 26, 2024

Conversation

TheCakeIsNaOH
Copy link
Member

@TheCakeIsNaOH TheCakeIsNaOH commented Sep 7, 2023

Description Of Changes

Displays the saved software installation location for info and list
commands. If the package has no software install location, it displays
nothing, and if the package was installed/upgraded before the saving
feature was added, again, it does not show that line.

Motivation and Context

See #1901

Testing

  1. .\choco.exe install balcon wget
  2. .\choco.exe info balcon --local-only
  3. Ensure the software install location is listed
  4. .\choco.exe list --verbose
  5. Ensure the software install location is listed for both packages

Operating Systems Testing

  • Windows 10 22H2

Change Types Made

  • Bug fix (non-breaking change).
  • Feature / Enhancement (non-breaking change).
  • Breaking change (fix or feature that could cause existing functionality to change).
  • Documentation changes.
  • PowerShell code changes.

Change Checklist

  • Requires a change to the documentation.
  • Documentation has been updated.
  • Tests to cover my changes, have been added.
  • All new and existing tests passed?
  • PowerShell code changes: PowerShell v2 compatibility checked?

Related Issue

Fixes #1901
Depends on #3316 (merged)

@gep13
Copy link
Member

gep13 commented Dec 14, 2023

Happy to see this added, as long as for example, a package that only installed configuration files, or made some system changes, didn't have an entry in the Software Location when running choco info.

@TheCakeIsNaOH
Copy link
Member Author

Happy to see this added, as long as for example, a package that only installed configuration files, or made some system changes, didn't have an entry in the Software Location when running choco info.

This pulls the location from the stored value in #3316

So if a package does not have an installation script, that location would be set to the package installation directory as per: #2242

If a package does have an installation script, the location should only be set if the script sets $env:ChocolateyPackageInstallLocation (which can be set in the script manually, or the helper script will set it as well).

So packages that just copy configuration files or make system changes shouldn't have an install location saved to display unless the install script sets $env:ChocolateyPackageInstallLocation.

Does that work?

Displays the saved package deployment location for info and list
commands. If the package has no deployemnt location, it displays
nothing, and if the package was installed/upgraded before the saving
feature was added, again, it does not show that line.
@gep13 gep13 marked this pull request as ready for review April 26, 2024 14:33
Copy link
Member

@gep13 gep13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@gep13 gep13 merged commit ef05daf into chocolatey:develop Apr 26, 2024
5 checks passed
@gep13
Copy link
Member

gep13 commented Apr 26, 2024

@TheCakeIsNaOH thank you for getting this added!

@TheCakeIsNaOH TheCakeIsNaOH deleted the gh1901-list-location branch April 30, 2024 19:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Include installation path in the output from the choco info command
2 participants