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

Install external dependencies when module is deployed #11

Open
FISHMANPET opened this issue Jun 26, 2020 · 0 comments
Open

Install external dependencies when module is deployed #11

FISHMANPET opened this issue Jun 26, 2020 · 0 comments
Labels
enhancement New feature or request PSModule

Comments

@FISHMANPET
Copy link
Member

This is related to #2 but different. PowerShell doesn't do anything about external dependencies but tell you you need to handle them when you install. After publishing a module with an external dependency and forgetting to install the dependency causing a failure, I decided to install the dependency.

Right now this has the same limitations as #2 where only bare string dependencies are supported. Right now it will look at the dependencies, then filter out any that aren't external, then do a get-module for each one, and if it isn't found try to install it. I also added a step to register the PS gallery because it wasn't present on some machines (because of TLS1.2 stuff).

The change that needs to be made here, like #2, is to support dependencies that are objects. For example if there's an external dependency for a particular version or minimum version, this should not just check the presence of the dependency but its version as well.

There's also a "failsafe" where the module will be imported after install, to ensure it can be imported. This at the very least will highlight errors at deploy time instead of run time

@FISHMANPET FISHMANPET added the enhancement New feature or request label Jun 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request PSModule
Projects
None yet
Development

No branches or pull requests

1 participant