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

[Feature]PI should use system Git if it is already installed, rather than downloading a new copy #46

Open
elisimpson opened this issue Dec 28, 2022 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@elisimpson
Copy link

Is your feature request related to a problem? Please describe.
I have Git installed on all my systems already, so PI downloading another copy in unnecessary. Slows down the initial setup.

Describe the solution you'd like
PI should check if "git" is available in the PATH and prevent download of local Git if so.

@elisimpson elisimpson added the enhancement New feature or request label Dec 28, 2022
@elisimpson
Copy link
Author

@ALIENQuake Hoping this can get worked on. Here's some additional info from the ProjectInfinity-Tools-Download log:

Required Git 2.30.2 is missing
Any local Git version is missing
Global Git is missing

Git is definitely installed but is not being detected by PI. Is perhaps PI looking for the exact version 2.30.2? I'm currently running 2.43.0

If not, there's something wrong with PI's Git detection code as according to the log it's looking for a "Global Git" install and not finding it.

@ALIENQuake
Copy link
Owner

@elisimpson Hey,

  1. Can you successfully launch git simply by typing git --version in the console?
  2. What's the outcome of this code executed in Windows PowerShell:
function Get-GitGlobalPath {
    # check if git can be launched as global tool
    $ErrorActionPreference = 'SilentlyContinue'
    $p = Start-Process "git" -ArgumentList '--version' -WindowStyle Hidden -Wait -PassThru 
    $ErrorActionPreference = 'Continue'
    if ($null -ne $p -and $p.ExitCode -eq 0) {
        [version]$global:gitGlobalVersion = (Get-Item ($p.StartInfo.FileName) -Force).VersionInfo.FileVersionRaw
        $gitPath = 'git'
    }
    else {
        $gitPath = $null
    }
    $gitPath
}

Get-GitGlobalPath

@elisimpson
Copy link
Author

  1. yes ... "git version 2.43.0.windows.1"
  2. script outputs "git"

Despite git being available PI always thinks it needs to download a local copy for the Tools dir

@ALIENQuake
Copy link
Owner

This will be fixed in the next version, no ETA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants