PowerShell / PowerShell/PSResourceGet
Add `-Force` parameter to: `Update-PSModuleManifest`
Open
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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