Skip to content
This repository was archived by the owner on Jun 13, 2024. It is now read-only.
This repository was archived by the owner on Jun 13, 2024. It is now read-only.

Update-Module doesn't update dependencies and is generally not good enough #466

Open
@PrzemyslawKlys

Description

@PrzemyslawKlys

Currently, Update-Module behavior is a bit special. When creating modules and writing blog posts I've usually told people to use Install-Module, and later on use Update-Module when a new version is out. However, that brings more problems then it solves, and I've recently stopped recommending Update-Module.

When you do:

Update-Module <module>

It updates:

  • only main module
  • it doesn't update dependent modules
  • it doesn't download any new modules that were added as dependant on in next version
  • it updates module by downloading new version leaving the old one in its place

This leads to less than useful command. I've people doing Update-Module and then complaining about things not working. But that's because I've updated 3-5 other modules with different functionalities that make the main module what it is.

People have much better results of just using:

Install-Module <module> -Force

Or in some cases:

Install-Module <module> -Force -AllowClober -SkipPublisherCheck -AcceptEula

This gives me:

  • the newest version of the main module
  • the latest version of any dependent modules
  • always downloads any new modules that were added in the new version
  • puts update module next to the old one.

See the difference? It does everything Update-Module was supposed to do, except better.

In my opinion Update-Module should:

  • update the main module
  • update any dependencies (if not used with -force, prompt)
  • update any newly added dependencies
  • preferably uninstall any old modules, but I can see how this can be tricky if some people want to keep using an older version

It also touches the issue described here: https://github.com/PowerShell/PowerShellGet/issues/130

Further clarification:

  • Before

image

  • It seems that Update-Module -Force updates required modules

image

But in my opinion Update-module without force should at least ask for updating required modules.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions