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

(#3292) Ensure pre-release flag is used for parent lookup #3293

Conversation

AdmiringWorm
Copy link
Member

@AdmiringWorm AdmiringWorm commented Aug 3, 2023

Description Of Changes

These changes makes sure that we pass along any pre-release flag
when there is a pre-release package that is a parent of one of the
packages that we are installing, and to verify that the results is not
null before we attempt to use it.

Motivation and Context

This ensures that pre-release only packages can be found when we
look up the parent, and if by some reason the package can not be
found we do not throw an undesired null exception in this case.

Testing

  1. Install chocolatey-core.extension version 1.3.3 using choco install chocolatey-core.extension --version 1.3.3
  2. Install firefox-dev using choco install firefox-dev --pre
  3. Upgrade chocolatey-core.extension to latest version using choco upgrade chocolatey-core.extension

Operating Systems Testing

  • Windows 10
  • Test Kitchen (Windows Server 2019)

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

@AdmiringWorm AdmiringWorm self-assigned this Aug 3, 2023
@AdmiringWorm AdmiringWorm requested a review from gep13 August 3, 2023 12:48
@gep13 gep13 force-pushed the bugfix/3292-Unable-to-upgrade-package-if-p branch from b58498e to 3d10959 Compare August 4, 2023 14:29
@gep13 gep13 changed the base branch from develop to hotfix/2.2.2 August 4, 2023 14:29
AdmiringWorm and others added 2 commits August 4, 2023 16:51
These changes makes sure that we pass along any pre-release flag
when there is a pre-release package that is a parent of one of the
packages that we are installing, and to verify that the results is not
null before we attempt to use it.

This ensures that pre-release only packages can be found when we
look up the parent, and if by some reason the package can not be
found we do not throw an undesired null exception in this case.
@gep13 gep13 force-pushed the bugfix/3292-Unable-to-upgrade-package-if-p branch from 3d10959 to 235c4b7 Compare August 4, 2023 15:51
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
Copy link
Member

gep13 commented Aug 4, 2023

@AdmiringWorm thank you for digging in and getting this fixed!

@gep13 gep13 merged commit e442793 into chocolatey:hotfix/2.2.2 Aug 4, 2023
4 checks passed
@AdmiringWorm AdmiringWorm deleted the bugfix/3292-Unable-to-upgrade-package-if-p branch September 25, 2023 12:42
@chocolatey chocolatey locked as resolved and limited conversation to collaborators Aug 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
4 participants