-
-
Notifications
You must be signed in to change notification settings - Fork 76
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 reference specific version of prerelease #132
Comments
Any news about this issue? |
I'm looking for this, too. It looks like this has become abandonware. 😢 I have a PR open on another of his modules, BuildHelpers, but crickets. |
OK, I tried this using a different configuration. In my case, I was trying to get the updated PowerShellGet module, now called PSResourceGet. Here's the configuration I used: @{
PSResourceGet = @{
Name = 'Microsoft.PowerShell.PSReourceGet'
DependencyType = 'PSGalleryModule'
Version = 'latest'
Parameters = @{
AllowPrerelease = $true
}
}
} However, it looked like the first time around, all that happened was that the module was "installed" to my specified target path. A subsequent run of PSDepend resulted in an error:
It seems the problem here, is that the
But the real version of this module is I'm looking to create a PR for this issue. When I've done so, if @RamblingCookieMonster does not merge this in, you can always clone from my branch. I do this with BuildHelpers currently, as I have an open PR on this module, too, where I added some functionality. Instead of using the PowerShellGet version, I clone my git repo and checkout the branch containing my feature. Just be aware that when using git dependencies, PSDepend can't do an "import" on them because not all git dependencies are PowerShell modules. Too bad there isn't a way to "enable" importing a PowerShell module based on a cloned Git repo....sounds like a custom provider for PSDepend to me! 😉 |
@avalery In lieu of cloning my git repo, this really is a single-line change. You could just update your copy of the module for now, according to the diff shown in my PR to resolve your issue. Hope that helps! |
Let's stay I published a module named MyModule with a prerelease version 1.2.3-alpha, and tried to use it as a dependency using this configuration:
If I call
Invoke-PSDepend "requirements.psd1" -Install -Force -Import
to download them and import them automatically, I got an error when PSDepend triggers Import-Module, because it gives "1.2.3-alpha" and Import-Module call only accept "1.2.3".Isn't possible in PSDepend to adapt the code: if the module is a prerelease, trigger Import-Module with the version number without the prerelease "tag"?
The text was updated successfully, but these errors were encountered: