chocolatey / chocolatey/choco

Uninstall-ChocolateyZipPackage should be smarter when using the ZipFileName

Open
#648 3 comments 0 reactions 0 assignees View on GitHub
0 - Backlog Enhancement
Dominant language
C#
Stars
11.5k
Forks
960
PR merge metrics
No merged PRs in 30d

Description

This was taken from a message in [Google Groups](https://groups.google.com/d/msgid/chocolatey/2736cedf-7a84-40e1-b2b9-c9fd772b74ce%40googlegroups.com):

> If I run Install-ChocolateyZipPackage.ps1 it creates a file chocolatey\lib\\Install.zip.txt, containing all files and folders that were unzipped.
I then want to uninstall using UnInstall-ChocolateyZipPackage.ps1. This script expects 2 parameters: PackageName and ZipFileName. The description in the scripts say: ZipFileName: This is the zip filename originally installed.
However, if I only pass the zip file name as parameter (in my case .zip), it does not remove the extracted files and folders, because it looks for a file chocolatey\lib\\.zip.txt in stead of chocolatey\lib\\Install.zip.txt. In case I pass Install.zip as parameter the uninstall works fine.
Is this expected behaviour? If yes, I think it would make sense to update the parameter description in UnInstall-ChocolateyZipPackage.ps1.

Contributor guide

Open the contributing guide

Research direction

Compare Install-ChocolateyZipPackage.ps1 with UnInstall-ChocolateyZipPackage.ps1, focusing on how ZipFileName is recorded and resolved. Reproduce the documented filename case, then determine whether the completed behavior should support the original zip name or whether the parameter description must be corrected.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell
Domain
tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.