-
Notifications
You must be signed in to change notification settings - Fork 287
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
Guidance on External Module Dependencies #151
Comments
Use the RequiredModules section of the psd1 file and then PowerShellGet will handle the rest for you. |
Thank you for such a fast reply! |
Not sure what you mean, exactly. Testing that PowerShell or PowerShellGet work is kind-of outside the scope of your module, right? I mean, there are tests in their repositories, and you can validate how the installation works with existing modules such as ModuleBuilder which depends on Configuration, or PowerLine which depends on Configuration and PANSIES -- or even the "Az" module which is a "meta module" that installs about 60 dependencies... For what it's worth ...Faking out the module during installation with PowerShellGet is complicated, because they do extra (file system) checks when installing (they keep metadata files with the modules that they install), so the existence of a module on your system will not convince them to skip installing the version that comes from the same gallery you're installing from. However, you can easily create a new PowerShellGet Source by registering a folder on your system as your source, and sticking (real or partial or metadata-only) modules in there to trick PowerShellGet into not installing the real modules. Additionally, there's an |
Hello! This is such a great document! Thanks to all the community for putting it together.
I am authoring a module that I'd like to be re-usable by others. This module depends on other third-party modules. What's the best or "least wrong" way to define these dependencies in such a way as that, when a user downloads the module, the dependencies will be downloaded, too?
Thanks much!
The text was updated successfully, but these errors were encountered: