Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Suggestion] Using name instead of path parameter in PSGalleryModule deployment type #117

Open
Geogboe opened this issue Sep 25, 2018 · 0 comments

Comments

@Geogboe
Copy link

Geogboe commented Sep 25, 2018

Overview

When Publish-Module is invoked by this deployment type the path parameter is being used instead of the name param. The path param seems to require a directory and if you give it a directory that does not NOT match the name of your module ( for instance name Src ) or you give it the path to your module's psd1 you'll get errors like below:

Publish-Module : The specified path 'C:\dev\MyRepo\Src\MyModule.psd1' is not a valid directory.
At C:\Program Files\WindowsPowerShell\Modules\PSDeploy\1.0.1\PSDeployScripts\PSGalleryModule.ps1:54 char:9
+         Publish-Module @params
+         ~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (...:String) [Publish-Module], ArgumentException
    + FullyQualifiedErrorId : PathIsNotADirectory,Publish-Module

or, if using the Src dir

Publish-Module : The specified module with path 'C:\dev\MyRepo\Src\` was not published because no valid module was found with that path.
At C:\Program Files\WindowsPowerShell\Modules\PSDeploy\1.0.1\PSDeployScripts\PSGalleryModule.ps1:54 char:9
+         Publish-Module @params
+         ~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (..., ArgumentException
    + FullyQualifiedErrorId : InvalidModulePathToPublish,Publish-Module

I could be missing something but it seems like an easy fix would just be to use name instead of path. The name param will accept a dir path, a name, or a file path. When I make this change locally, things work fine.

Thanks for all your work on this! Love this tool.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant