PowerShell / PowerShell/PSResourceGet

Add `-Force` parameter to: `Update-PSModuleManifest`

Open
#1,747 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature_request Issue-Discussion
Dominant language
C#
Stars
576
Forks
114
Avg merge
1d 2h
Merged PRs (30d)
7

Description

Summary of the new feature / enhancement

In case the manifest doesn't (yet) exist, I would like to be able to create it with a single command.
Currently the Update-PSModuleManifest generates an error if the manifest doesn't yet exist:

Update-PSModuleManifest: Cannot find path '.\Test.psd1' because it does not exist.

Rather than doing something like:

if (Test-Path .\Test.psd1) { Update-PSModuleManifest -Path .\Test.psd1 @Settings }
else { New-ModuleManifest -Path .\Test.psd1 @Settings }
Proposed technical implementation details (optional)

I would like to simply do:

Update-PSModuleManifest -Path .\Test.psd1 @Settings -Force

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the Update-PSModuleManifest cmdlet and compare its missing-path behavior with New-ModuleManifest. Verify that a new -Force invocation can create the manifest at the requested path while preserving the existing behavior without -Force.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, powershell
Domain
cli
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.