Skip to content

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

@RamblingCookieMonster

Description

@RamblingCookieMonster

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugstatus: staleNo activity, candidate for closing

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions