PowerShell / PowerShellGet

This module provide functions used with PowerShellGet v3 to provide compatibility with scripts expecting PowerShellGet v2
MIT License
49 stars 13 forks source link

Instruction to install PowerShellGet without Install-Module #66

Open leonyu opened 4 months ago

leonyu commented 4 months ago

Summary of the new feature / enhancement

Alpine Linux now has a powershell package but it does not come with Install-Module, so there is no way to install PowerShellGet using existing instructions.

Could we document instructions on how to install PowerShellGet without a prior installation?

Proposed technical implementation details (optional)

E.g.

GeorgeBroughton commented 9 hours ago

What you are suggesting would ultimately mean that every package maintainer who makes modules for powershell would have to provide bespoke instructions for alpine linux. It would be much more efficient if the maintainer for powershell under alpine would just provide those instructions, or implement install-module themselves.

It seems this is also mentioned in Powershell's GitHub issues, so it's probably best to keep track of the issue there.

Though, to answer where you could install the modules, you could put them in ~/.local/share/powershell/Modules according to some sources online.

Let me know how that goes for you anyways. I'll spin up an alpine VM in a few and have a look into the problem.

leonyu commented 6 hours ago

Instructions for installing Package Managers for a program language runtime is extremely common:

Package Manager should figure figure out which path it takes:

GeorgeBroughton commented 59 minutes ago

The instructions are in readme.md already. Your issue is due to a bug with the version of powershell distributed on alpine, which is documented in the link in my previous comment.

The manual instructions are:

Get PowerShellGet Source

Steps

If import-module is also missing on your distro, this needs to be brought up with the maintainer of powershell for your distro, not here. Those commands are supposed to be usable by default, as stated in the issue I linked earlier.

leonyu commented 7 minutes ago

The problem is due to lack of Import-Module.

If import-module is also missing on your distro, this needs to be brought up with the maintainer of powershell for your distro, not here.

Love your open source passion. However, I am going to draw the line here -- I am simply a user here to report a compatibility issue between 2 major pieces of open source software. It is not user's job to facilitate communications between software projects (e.g. distributor should bundle this, distributor could avoid that, distributor should run this test suite).

In similar vein, if Photoshop has compatibility issues with Windows, do you expect a hobbyist designer to travel between Redmond and San Jose facilitate communication between Microsoft and Adobe?