Skip to content

Enhancement: bundle posh-git? #1384

Closed as not planned
Closed as not planned
@dahlbyk

Description

@dscho reached out to me about bundling posh-git with Git for Windows, which I certainly support.

My tentative suggestion would be to have the Git for Windows installer detect a supported PowerShell version (see dahlbyk/posh-git#328 for version support discussion). If available, launch PowerShell to execute a script that runs Install-Module (included in 5.0+, or via PackageManagement PowerShell Modules Preview, if available.

Do you have any way to install it system-wide? (Git for Windows installs system-wide, therefore installing posh-git for the installing user would be a little unfortunate.)

Install-Module accepts a -Scope parameter of either CurrentUser or AllUsers (paths). I assume the Git for Windows installer would be able to spawn an elevated shell to install with AllUsers.

The other part of installation is to inject Import-Module posh-git into a PowerShell profile, which can be one of:

  1. Current User, Current (Default) Host
  2. Current User, All Hosts
  3. All Users, Current (Default) Host
  4. All Users, All Hosts

posh-git's Add-PoshGitToProfile supports -AllHosts but does not support toggling CurrentUser/AllUsers.

Also: what's your release cadence? Would you like to coordinate with Git for Windows releases, or are you fine with me simply picking up the latest posh-git whenever I see a new one?

Release cadence is....infrequent? I'd just let PowerShellGet install the latest for the given platform.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions