Skip to content

Inconsistent path between shell types causing inconsistent Git version and tools if Git is installed locally and a different version than embeded Git #2373

@daxgames

Description

@daxgames

Purpose of the issue

  • Bug report (encountered problems/errors)
  • Feature request (request for new functionality)
  • Question

Version Information

Cmder Version: 1.3.16

Windows Version: 10 2004 Build 19041.388
Locally installed Git: 2.27.0.windows.1
Embedded Git Version: 2.28.0.windows.1

Description of the issue

Inconsistent path between shell types causing inconsistent Git version and tools if Git is installed locally and a different version than embeded Git

  1. Git is installed locally in C:\Program Files\Git.
  2. Launching cmd::Cmder and powershell::powershell shells result in inconsistent path between shell types causing inconsistent Unix tools availability.
  3. If Git is installed locally and a different version than Cmder embedded Git then Git version is also inconsistent.

See screenshot of path from cmd::cmder, powershell::powershell, bash::bash split by delimiter into separate lines:

image

Result of inconsistencies in each shell:

  • cmd::cmder
    • Git Version: 2.28.0.windows.1
    • Other Unix tools are available for use in the path.
  • powershell::powershell
    • Git Version: 2.27.0.windows.1
    • Other Unix tools are NOT available for use in the path.
  • bash::bash Git Version: 2.27.0.windows.1
    • Git Version: 2.27.0.windows.1
    • Other Unix tools are available for use in the path.

Proposed Fix:

  • Use the newer Git version in all shells.
  • If Git is installed and configured locally and embedded Git is older.
    • Today we add Unix tools from the local install to the path for cmd::cmder but not powershell::powershell
    • Proposal:
      • Use the current path and make no changes regarding Git and Unix tools only add Cmder folders.
  • If Git is NOT installed and configured locally and we have embedded Git.
    • Today we add %cmder_root%\vendor\git-for-windows\cmd to the front of the path
      and add %cmder_root%\vendor\git-for-windows\mingw64\bin and %cmder_root%\vendor\git-for-windows\usr\bin after C:\Windows to the end of the path
      using embedded Git version and preferring Windows tools.
  • If Git is installed and configured locally and embedded Git is newer
    • Today we add Unix tools to the path for cmd::cmder but not powershell::powershell
    • Match the path config of the locally installed version using the embedded git install
      • Example 1: If locally installed Git only adds C:\Program Files\Git\cmd to the path
        then cmd::cmder and powershell::powershell should do the same by
        adding %cmder_root%\vendor\git-for-windows\cmd to the front of the path
        overriding locally installed Git using embedded version.
      • Example 2: If locally installed Git adds C:\Program Files\Git\cmd to the path and also C:\Program Files\mingw64\bin and C:\Program Files\usr\bin after C:\Windows
        then cmd::cmder and powershell::powershell should do the same by
        adding %cmder_root%\vendor\git-for-windows\cmd to the front of the path
        and adding C:\Program Files\mingw64\bin and C:\Program Files\usr\bin after C:\Windows to the end of the path
        overriding locally installed Git using embedded version and preferring Windows tools.
      • Example 3: If locally installed Git adds C:\Program Files\Git\cmd to the path and C:\Program Files\mingw64\bin and C:\Program Files\usr\bin before C:\Windows\System32
        then cmd::cmder and powershell::powershell should do the same by
        adding %cmder_root%\vendor\git-for-windows\cmd and C:\Program Files\mingw64\bin and C:\Program Files\usr\bin to the front of the path
        overriding locally installed version and preferring Unix tools.

Comments?

Metadata

Metadata

Assignees

No one assigned

    Labels

    👀 Awaiting ResponseWaiting to hear back from the issue reporter.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions