I wanted to share a little adventure I had with your pgutil tool version 2.1.2.0 on Ubuntu 24.04.
What Happened:
I was debugging a pipeline and wanted to try it locally, I ran:
pgutil upack install --package=prod-tool --version=2.0.6 --feed=tools --target=.
Here I fucked up by installing to . which was currently my home folder.
I then wanted to remove it:
pgutil upack remove --package=prod-tool
Much to my surprise, instead of just removing the package, it wiping out almost everything in my home folder. It even managed to remove symlinks in my .config folder and folders like Downloads.
Command Output:
pgutil upack remove --package=prod-tool
Removing package from registry...
Deleting content of /home/rhagelin.creatorctek.local...
Unhandled exception. System.IO.IOException: Directory not empty: '/home/rhagelin.creatorctek.local/.config/teams-for-linux/Partitions/teams-4-linux'
at System.IO.FileSystem.RemoveDirectoryRecursive(String)
at System.IO.FileSystem.RemoveDirectory(String, Boolean)
at System.IO.DirectoryInfo.Delete(Boolean)
at PgUtil.Program.UpackCommand.RemoveAsync(RegisteredUniversalPackage package, UniversalPackageRegistry registry, CancellationToken cancellationToken)
at PgUtil.Program.UpackCommand.RemoveCommand.ExecuteAsync(CommandContext context, CancellationToken cancellationToken)
at ConsoleMan.Command.ExecuteAsync(String[])
at PgUtil.Program.Main(String[] args)
at PgUtil.Program.<Main>(String[] args)
zsh: IOT instruction (core dumped)
pgutil upack remove --package=prod-tool
Thankfully it it stopped there.
I did not dare to test it with the lasted version of pgutil,
While this mishap was probably due to my user error, the enthusiastic removal of my home folder's contents seemed worth reporting. :)