Skip to content

fix(install): add null check for package feed entries to prevent errors on empty or malformed XML#710

Open
nitroz3us wants to merge 1 commit intomandiant:mainfrom
nitroz3us:main
Open

fix(install): add null check for package feed entries to prevent errors on empty or malformed XML#710
nitroz3us wants to merge 1 commit intomandiant:mainfrom
nitroz3us:main

Conversation

@nitroz3us
Copy link

PR: Add Null Check for Package Feed Entries in install.ps1

Summary

Adds a null check for package feed entries in install.ps1 to prevent errors when the XML is empty or malformed.

Details

  • Previously, the script would throw a null reference exception if the package feed XML did not contain any <entry> nodes (for example, if the download failed or the XML was malformed).
  • This change adds a check to ensure that $vm_packages.feed.entry exists before attempting to process it.
  • If no entries are found, a helpful message is shown instead of crashing.

…rs on empty or malformed XML

Prevents a null reference exception when the package feed XML does not contain any <entry> nodes.
Now, a helpful message is shown instead of crashing.
@google-cla
Copy link

google-cla bot commented Jul 18, 2025

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Copy link
Member

@Ana06 Ana06 left a comment

Choose a reason for hiding this comment

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

@Ana06 Ana06 added the 😕 needs info Further information is needed label Aug 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

😕 needs info Further information is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants