PSResourceGet icon indicating copy to clipboard operation
PSResourceGet copied to clipboard

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

Open iRon7 opened this issue 1 year ago • 0 comments

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

iRon7 avatar Nov 02 '24 14:11 iRon7