Skip to content

Add new command "wix extension update" - #735

Draft
WolfgangHG wants to merge 1 commit into
wixtoolset:mainfrom
WolfgangHG:extension_update
Draft

WolfgangHG wants to merge 1 commit into
wixtoolset:mainfrom
WolfgangHG:extension_update

Conversation

@WolfgangHG

Copy link
Copy Markdown

This resolves part two of https://github.com/orgs/wixtoolset/discussions/9313: it is not possible to update an extension. So you first have to remove the old version and then add the new version.

This pull request adds a wix extension update command: it removes all older (but no newer) versions of the extension from the extension cache, then it does the same as wix extension add ... would do.

Sample:

wix extension update -g "WixToolset.Util.wixext/7.0.0"

Is it required to check the version of the found extensions, or could I remove also newer version?

I marked this pull request as "draft" because I want to use the wix extension remove log message that I added in #734. If my suggestion to enhance logging from #734 is accepted, I would also add a similar status message to wix extension add.

Is there anything else that I need to update? Unit tests?

@WolfgangHG

Copy link
Copy Markdown
Author

I thought about using ExtensionCacheManager.ListAsync to get a list of all installed versions of an extension, but this method internally loops over a list of cache locations, while AddAsync and RemoveAsync work on a single (the first) cache folder. So I fall back to checking the cache folder content myself.

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.

1 participant