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

Try to install git even if git has been installed #59

Closed
lxl66566 opened this issue May 23, 2024 · 5 comments
Closed

Try to install git even if git has been installed #59

lxl66566 opened this issue May 23, 2024 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@lxl66566
Copy link

The code does not actually check if git exists. (If git is not installed from winget)

@Raphire
Copy link
Owner

Raphire commented May 23, 2024

Heya,

WinGet actually checks if git is already installed, this even works in cases where WinGet was not used to install it. I just confirmed this behaviour on my windows 10 system that had git manually installed.

Have you run into issues with this?

@Raphire Raphire self-assigned this May 23, 2024
@lxl66566
Copy link
Author

My git was installed by scoop: scoop install git. Winget did not detect it, and started to download:

C:\Users\lxl>where git
D:\scoop\shims\git.exe

C:\Users\lxl>git -v
git version 2.45.1.windows.1

C:\Users\lxl>winget -v
v1.7.11261

C:\Users\lxl>winget install git.git --accept-package-agreements --accept-source-agreements --disable-interactivity --no-upgrade
Found Git [Git.Git] Version 2.45.1
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Downloading https://github.com/git-for-windows/git/releases/download/v2.45.1.windows.1/Git-2.45.1-64-bit.exe
  █▊                              4.00 MB / 64.7 MB
Cancelled
Terminate batch job (Y/N)? Y
  • Additional info: OS Version: windows 11 23H2 22631.3447

I tried on another PC that installed git by official installer, and winget does detect it. The difference may be that the installer writes package information to the Windows registry, but Scoop does not?

@Raphire
Copy link
Owner

Raphire commented May 23, 2024

Ooh interesting.

I'm guessing this is due to the fact that scoop installs apps in an unusual way, keeping them isolated in a scoop folder.

Seems like we'll need to manually check if git is installed after all! Thanks for bringing this to my attention 😃

@Raphire Raphire added the bug Something isn't working label May 23, 2024
@Raphire
Copy link
Owner

Raphire commented May 23, 2024

@lxl66566 This issue should now be resolved as of 9401de8. Could you please confirm on your end that it's now detecting git correctly?

@lxl66566
Copy link
Author

Yes, now it works well. Thank you!

Raphire added a commit that referenced this issue May 24, 2024
… + more

Added new option to disable Game DVR. (#62)
Clearing the start menu now creates a backup of the current start menu file. (#60)
Fixed unnecessarily setting path variable in Get.ps1 in some situations (#59)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants