Skip to content
This repository was archived by the owner on Jun 13, 2024. It is now read-only.
This repository was archived by the owner on Jun 13, 2024. It is now read-only.

Install-Module should default to CurrentUser #236

@indented-automation

Description

@indented-automation

I add a default parameter for Install-Module to set Scope to CurrentUser wherever I use the command. I explicitly set the scope to CurrentUser when I use it in build scripts (CI tooling).

I believe the default install location should be CurrentUser. A system level change should only occur when explicitly requested.

Expected Behavior

Modules installed using Install-Module should be placed in CurrentUser scope unless I explicitly request AllUsers scope.

Current Behavior

Modules installed using Install-Module attempt to install into AllUsers scope, I must explicitly request the less broad scope.

Possible Solution

The current default for the Scope parameter should be changed to CurrentUser:

https://github.com/PowerShell/PowerShellGet/blob/development/PowerShellGet/PSModule.psm1#L1962

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions