Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Installer file only if it exists #67

Closed

Conversation

slycordinator
Copy link

@slycordinator slycordinator commented Mar 4, 2024

Fixes #66

The package doesn't include the 32-bit installer.

So, when Remove-Item -Force -ea 0 "$filePath32" is called, windows powershell errors out, because it ends up checking the path for an empty string.

This changes the package to remove the installer only when the filename variable is set and the path to it exists.

NOTE:
It's possible to instead simply remove everything that refers to 32-bit instead. But the way the PR changes things would allow for installation of the package were upstream to bring back 32-bit support.

The package doesn't include the 32-bit installer.

So, when Remove-Item -Force -ea 0 "$filePath32" is called, powershell 5.1 could error out, because it's checking the path of an empty variable.

This changes the package to remove the installer only when the filename variable is set and the path exists.

NOTE:
It's possible to instead simply remove everything that refers to 32-bit instead. But the way the PR changes things allows for the possibility if upstream were to bring back 32-bit support.
Change to detect installer and only install/upgrade it if it's detected

This makes it so that a user running 32-bit will not have it attempt to install/upgrade for the most recent version, as it's not included/supported.
@slycordinator
Copy link
Author

Added modification to make the package only install/upgrade if the installer file is included/found.

Since otherwise, a user who happens to still have a 32-bit install won't erroneously get updated to this one.

@AeliusSaionji
Copy link
Owner

Thanks for the PR, but I ended up just removing 32bit from the package. The chocolatey client will inform 32bit users that updates are only compatible with x64

@slycordinator
Copy link
Author

No worries.

@slycordinator slycordinator deleted the wsltty_installer_fix branch March 5, 2024 01:33
@opello
Copy link

opello commented Apr 16, 2024

https://community.chocolatey.org/packages/wsltty/3.7.1.20240304

Looks like Chocolatey is waiting for you to ask for moderator approval? I'm not sure how notifications for the messages in the "comments list" scrolling div get sent out, but here's the detail:

wsltty has been flagged as part of automated virus scanning.
Package virus scanning found that at least 1 file within, or downloaded by, the package has between 6 and 10 VirusTotal detections associated with it.

After logging it it seems that the installer showed 6 detections:

wsltty-3.7.1-x86_64-install_x64.exe (397036f24ebb)
-6/71

And annoyingly today VirusTotal shows 4. I'm not sure if there's a way to trigger a re-query of VirusTotal in some Chocolatey dashboard. But just so you're aware I did open an upstream issue and it seems like the only real answer is to sign the installers which was more scope than upstream was willing to accept.

That was all in service of:

If there a known reason that this software may have a high rate of false positives, please link to the upstream documentation (for example it could be an issue or wiki) in the package description.
Then ask for an exemption and a moderator will review the documentation.
If there is not a known and documented reason, please contact the software authors to see if they have any reasons they can document.

The reason is iexpress.exe generated installers are commonly used in pentesting and malware packagers so it's essentially been fingerprinted as universally bad, despite it's more humble beginnings.

Anyway, I hope this was helpful and prods the process along. Thanks for maintaining this in Chocolatey.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

wsltty 3.7.1: ERROR: Cannot bind argument to parameter 'Path' because it is an empty string
3 participants