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

(#3315) Save software installation location #3316

Merged
merged 1 commit into from Apr 26, 2024

Conversation

TheCakeIsNaOH
Copy link
Member

@TheCakeIsNaOH TheCakeIsNaOH commented Sep 7, 2023

Description Of Changes

Saves the location of where the contents of the Chocolatey package
(whether that is a native installer, or an extraction of a zip file, or
whatever else is in the package) is deployed to into a
".deploymentLocation" file inside the package info directory.

This allows Chocolatey CLI or GUI to later retrieve it and display it to
the user when listing the details of locally installed package(s).

Motivation and Context

See #3315

Testing

  1. .\choco.exe install wget --force
  2. Ensure that the software location is logged and a .softwareLocation file containing the path is created in the folder under .chocolatey
  3. .\choco.exe install wget --skip-powershell --force
  4. Ensure that there is no software location logged and there is no .softwareLocation file
  5. .\choco.exe install balcon
  6. Ensure that the software location is logged and a .softwareLocation file containing the path is created in the folder under .chocolatey

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 #3315

@gep13
Copy link
Member

gep13 commented Apr 26, 2024

@TheCakeIsNaOH based on a conversation with @pauby I have taken the liberty of making some changes to this PR.

We are going to move forward with the concept of things being "deployed", since a Chocolatey package can have more than just software in it. So things like .softwareLocation and are changed to .deploymentLocation.

@gep13
Copy link
Member

gep13 commented Apr 26, 2024

The testing steps are not quite right on this PR, but the concepts are still valid.

For example, even with the skip-powershell option, a .deploymentLocation file is still created, however, it points to the package folder, rather than the tools folder within the package.

This is the correct action, and I think that this was a change in output since the PR was created.

Saves the location of where the contents of the Chocolatey package
(whether that is a native installer, or an extraction of a zip file, or
whatever else is in the package) is deployed to into a
".deploymentLocation" file inside the package info directory.

This allows Chocolatey CLI or GUI to later retrieve it and display it to
the user when listing the details of locally installed package(s).
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 fa1111f into chocolatey:develop Apr 26, 2024
5 checks passed
@gep13
Copy link
Member

gep13 commented Apr 26, 2024

@TheCakeIsNaOH thank you (again) for all your work here!

@TheCakeIsNaOH TheCakeIsNaOH deleted the gh3315-remember-location branch April 28, 2024 00:36
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.

Remember software installation location
2 participants