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

Cannot use Import-Module GH:\... #4

Open
vors opened this issue Jul 17, 2015 · 1 comment
Open

Cannot use Import-Module GH:\... #4

vors opened this issue Jul 17, 2015 · 1 comment

Comments

@vors
Copy link

vors commented Jul 17, 2015

I would love to be able to do that, so I would have the latest dev version of modules that I'm working on

Currently I get an error

> Import-Module GH:\vors\ZLocation\ZLocation\ZLocation.psd1
Import-Module : The current provider (GithubProvider\Github) cannot open a file.
At line:1 char:1
+ Import-Module GH:\vors\ZLocation\ZLocation\ZLocation.psd1
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (GH:\vors\ZLocat...\ZLocation.psd1:String) [Import-Module], RuntimeExc
   eption
    + FullyQualifiedErrorId : FileOpenError,Microsoft.PowerShell.Commands.ImportModuleCommand
@weswigham
Copy link
Owner

In the meantime, you should be able to import simple modules (ie, doesn't depend on other gh modules) like so:

gc GH:\vors\ZLocation\ZLocation\ZLocation.psd1 | Import-Module

Import-Module not supporting non-fs providers is a similar issue to Out-File not supporting non-fs providers (and there's probably more). In theory I could alias over it and polyfill the functionality in a similar way... but it might not be possible, since included modules depend on things like $PSScriptRoot being set in a meaningful way. I'll need to see if there's a way to work around that.

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

2 participants