-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
PreInstall / PostInstall commands #1279
Comments
One of our goals has been to avoid running commands or other arbitrary code, but there might be a reasonable subset of behaviors that could be considered. I'm putting this in the backlog for future consideration. |
Thanks for the consideration. I'll provide a few use cases, and will update this comment with more as I come across them
|
We've got another bit of work planned to help with package like OBS Studio #1278. A user would be sad if they were hours into encoding a video and absentmindedly ran |
That is a very good point. I'm sure that there are positives and negatives to any use case |
Yes, and we're looking to provide the best user experience we can. Many of the things we are building now are driven by legacy installers. While it would be nice to have every installer modernized, that's not practical in the short term. We are trying to meet developers where they are. As more users adopt the Windows Package Manager, we're hoping to make it easier to install software on Windows 10 and Windows 11. As publishers become more familiar with the tool, and hopefully reach new customers, they will likely start making the improvements necessary to give their customers the best experience as well. |
@denelon Was this feature ever added? Our organization is looking at migrating from Scoop to winget for developer environment setup. This type of behavior can be very useful for configuring the installed software based on organization preferences. For example adding company certificates, corporate proxy settings, or installing common extensions. I suppose the alternative would be wrapping that functionality in its own Windows installer. |
No, this was not added @AlanMasciangelo |
Description of the new feature/enhancement
As mentioned in #1278 some installers have error codes for specific circumstances. Having the ability to execute one or two commands could make the users experience more seamless. Additionally, some packages such as f.lux which do not provide a version number could be modified with the command as a temporary workaround for poor development.
Proposed technical implementation details (optional)
The Windows Package Manager would have an enumeration of commands to be run before or after the installation or upgrade of a package. These could be enabled by default through a configuration option or with switches. If not specifically enabled, or not required for a package, the CLI could confirm with the user or default to not running the commands.
Example of switches:
Example of manifest
Precautions would have to be taken in the Azure Pipelines for winget-pkgs to ensure that no malicious code is executed.
The text was updated successfully, but these errors were encountered: