Skip to content

Path to modules should always align to PSModulepath #1049

Description

Prerequisites

  • Write a descriptive title.
  • Make sure you are able to repro it on the latest released version
  • Search the existing issues.

Steps to reproduce

Currently the path is only built from psmodule path if the scope is null, which would not normally happen
https://github.com/PowerShell/PowerShellGet/blob/6fd032a5c84ddc67ff57ab90997829275f460396/src/code/Utils.cs#L632

Expected behavior

Install-PSResource should put modules in the location defined by psmodulepath

Actual behavior

The path is hard coded

Error details

No response

Environment data

beta20

Visuals

No response

Activity

  1. alerickson commented on May 19, 2023

    @alerickson
    Member

    Current plan is to only provide support for hard coded paths. IE, install will only install to hard coded paths. Get-InstalledPSResource is a little more unclear. V2 does search within PSModulePath, however is it necessary to search within those paths if the concept behind "Install" is that PSGet manages the module lifecycle for you? That is to say, if you save to an arbitrary path PSGet will not necessarily be able to find it, and saving to the PSModulePath would be comprable to saving to an arbitrary path, so does PSGet need to support this scenario right now?

    In the near future we plan to have support for PSModulePath, however what to do in the meantime is still a bit up in the air.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions