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

Import action for PowerShell modules doesn't play well with ScriptsToProcess #70

Open
RamblingCookieMonster opened this issue Feb 28, 2018 · 0 comments
Labels

Comments

@RamblingCookieMonster
Copy link
Owner

RamblingCookieMonster commented Feb 28, 2018

ScriptsToProcess and other directives in a module manifest that run in the user's current scope will be loaded somewhere you can't get to.

Will add more details later, but https://github.com/cloudbase/powershell-yaml/blob/master/powershell-yaml.psd1#L49 is a good example.

For reference, we import modules here.

I think Gael already found this, but can't find the issue...

EDIT: Actually, powershell-yaml loads assemblies in ScriptsToProcess, and again in the psm1. Ignore me. Will close this if I validate it's not a problem
EDIT2: Nope. GitHub source != published module. They must have added that after the last publish. PowerShell Gallery code doesn't load the assemblies again in the psm1

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

No branches or pull requests

1 participant