[cChocoPackageInstall] handle missing choco install list cache xml file during package version switch #188
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description Of Changes
Prevent error when clearing missing choco install list cache file
Motivation and Context
When a choco package is reinstalled with a different version, the process typically
uninstalls the current version before installing the new one. During this process,
the same cache cleanup logic may be triggered multiple times.
As a result, the install list cache XML file may have already been deleted by an earlier step.
Attempting to delete the file again without checking its existence can cause an error,
which may disrupt the provisioning or deployment pipeline.
#160
Testing
Run the following DSC configuration using a choco package list with different versions:
Operating Systems Testing
Change Types Made
Change Checklist
Related Issue
Fixes #160