Closed
Description
When using publish-psresource, the folder/directory name must be the same as the directory folder, and publishing from a folder with the version name will result in an error
Example:
gh:\psrapid\psrAPId> publish-psresource -path C:\Users\adrian.andersson\git\psrapid\psrAPId\1.0.1\psrAPId.psd1 -Repository powershellgetbeta -Credential $pshelf.credential -APIKey $pshelf.NuGetApiKey -verbose
Publish-PSResource: Value cannot be null. (Parameter 'path')
[14:28 | 0.02]
gh:\psrapid\psrAPId> publish-psresource -path C:\Users\adrian.andersson\git\psrapid\psrAPId\1.0.1\ -Repository powershellgetbeta -Credential $pshelf.credential -APIKey $pshelf.NuGetApiKey -verbose
Publish-PSResource: No file with a .psd1 extension was found in C:\Users\adrian.andersson\git\psrapid\psrAPId\1.0.1\1.0.1.psd1. Please specify a path to a valid modulemanifest.
Works fine if the folder name matches the psd1 name. Seems its parsing the folder name and searching for a manifest file using that name, which makes having a versioned release folder a bit more complicated
Bonus Oddness:
It is possible to omit the repository name and publish-psresource will not throw an error, even if there are multiple repositories with the same priority weight