Xav83 / chocolatey-packages

Implementation of the template to create and maintain chocolatey packages both manual and automatic (mostly automatic)

Home Page:https://chocolatey.org/profiles/Xav83

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

phantombot package invalid download and install dir param request

Destroy666x opened this issue Β· comments

Hi,

1st of all, the package has a big issue of downloading the wrong release. This regex is incorrect: https://github.com/Xav83/chocolatey-packages/blob/develop/automatic/phantombot/update.ps1#L21 It assumes any kind of release basically and gets the 1st one, so PhantomBot-3.7.0.1-arm-bsd-other.zip in case of current version instead of proper PhantomBot-3.7.0.1-win.zip. The regex should include win and escape the extension dot like \.. So: $re = "PhantomBot.+win\.zip$"

Secondly, it would be nice if we could override the unzip location. So something like /InstallDir param that's available in many Chocolatey community packages would be handy.

Hi @Destroy666x πŸ™‚

Thank you a lot for creating this issue!

I have corrected the error in the update script for the Phantombot package (a2bf09d). From now on, all the new package version will point to the right zip.
Thank you again for noticing and notifying me πŸ™

About the second point, do you have some example of package that have the feature /InstallDir ?
To avoid reinventing the wheel, and to make sure that I understand your request πŸ˜‰

Thanks.

I do indeed. Many Chocolatey packages in the official community repository have it, for instance. Few examples:

It's mostly nice to have for apps that don't use standard install locations such as C:\Program Files by default. I don't recall where this was installed or unzipped but the location was quite random. Most likely either in the location where the install PS script is or in C:\tools

Hi @Destroy666x,

I have create a Pull Request #30 with the modification on the phantombot package which, if I understand correctly the code in the examples you mentioned, should allow people to be able to specify a parameter /InstallDir in order to specify another folder where to install Phantombot.

Feel free to comment on the Pull Request #30, if you see an error, something missing, or if everything looks fine to you πŸ˜‰
I'll integrate it next week, after a few tests on my Windows machine. After that, this feature will be integrated in the next update of Phantombot. πŸ™‚

Thanks, looks good, I'll check if it works fine later

It indeed does