PowerShell / DSC

This repo is for the DSC v3 project
MIT License
142 stars 22 forks source link

Self-update feature #281

Closed SteveL-MSFT closed 3 months ago

SteveL-MSFT commented 8 months ago

Summary of the new feature / enhancement

Similar to rustup, we should have:

dsc upgrade [channel]

with [channel]: stable, nightly, preview, or specific version also a --what-if switch to just show upgrade info and not perform the upgrade

Proposed technical implementation details (optional)

Since Windows can't overwrite process files which are open, dsc upgrade would actually spawn a new dsc-upgrade executable and dsc would just exit. dsc-upgrade would take care of downloading to a temp location, checking if any instances of dsc are running (on Windows, Linux/macOS can skip this step) and prompt if any are running (either try again or abort which removes the temp files).

It may make sense to have dsc start a thread to always check if an update is available and suggest using this subcommand to update.

SteveL-MSFT commented 3 months ago

I think we'll just publish dsc as a msix in the Store for auto-updates. Will have stable and preview channels.