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

Instruction to install PowerShellGet without Install-Module #66

Open
leonyu opened this issue Feb 25, 2024 · 4 comments
Open

Instruction to install PowerShellGet without Install-Module #66

leonyu opened this issue Feb 25, 2024 · 4 comments

Comments

@leonyu
Copy link

leonyu commented Feb 25, 2024

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.

  • Identify library path of PowerShell installation
  • Drop binary/source file in library path
@GeorgeBroughton
Copy link

GeorgeBroughton commented Jul 4, 2024

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
Copy link
Author

leonyu commented Jul 4, 2024

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

Package Manager should figure figure out which path it takes:

  • If it expects itself to be bundled with the language runtime, it should be available in all major distribution channels language runtime is available.
  • If it expects itself to not be bundled with the language runtime, it should have curl-esque instructions on how to install itself on a bare language runtime.

@GeorgeBroughton
Copy link

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

git clone https://github.com/PowerShell/PowerShellGet
  • Navigate to the source directory
cd path/to/PowerShellGet
  • Import the module
Import-Module src/PowerShellGet -Force

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
Copy link
Author

leonyu commented Jul 5, 2024

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?

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