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

Winget doesn't automatically adds a Git environment variable after installing Git in Windows 11 #2815

Closed
protyay opened this issue Jan 4, 2023 · 7 comments
Labels
Issue-Feature This is a feature request for the Windows Package Manager client. Resolution-Duplicate Issue is a duplicate
Milestone

Comments

@protyay
Copy link

protyay commented Jan 4, 2023

Description of the new feature / enhancement

When executing the following command
winget install -e --id Git.Git , the latest version of Git is installed but no git command can be executed because the environment variable PATH is not modified to include the Git installation folder.

Proposed technical implementation details

We can choose to modify the PATH variable and append the Git installation folder to enhance the user experience.

@protyay protyay added the Issue-Feature This is a feature request for the Windows Package Manager client. label Jan 4, 2023
@ghost ghost added the Needs-Triage Issue need to be triaged label Jan 4, 2023
@denelon
Copy link
Contributor

denelon commented Jan 4, 2023

Related to:

We're looking at another issue related to environment variables like "Path" that don't get refreshed in an active session. If a package has a dependency on another one and it needs to be on the path for the "primary" package to install, the primary package will fail.

In your particular example, if you close the "terminal" and re-open to get the environment variables updated, are you able to call git?

@denelon denelon removed the Needs-Triage Issue need to be triaged label Jan 4, 2023
@protyay
Copy link
Author

protyay commented Jan 5, 2023

Thanks for replying. Nope, even after restarting the terminal (and in my case, the machine) doesn't add the appropriate git executable to the PATH env.

@denelon
Copy link
Contributor

denelon commented Jan 5, 2023

I haven't encountered this issue or been able to reproduce it. The "installer" is responsible for adding Path entries. WinGet only adds portable (and in the next version .zip based portable) packages to the path. If you perform a "manual" uninstall and then run winget install git.git does it still not add the path entry?

If no, which version of git.git was installed, and can you share the logs?

The log location is visible via winget info as well as the version of WinGet and the architecture. That information could also be helpful. There is also an experimental feature in preview versions that can be enabled to add "--open-logs" to the command which will open the log directory if the feature is enabled.

@denelon
Copy link
Contributor

denelon commented Feb 9, 2023

Duplicate of #222

@denelon denelon marked this as a duplicate of #222 Feb 9, 2023
@microsoft-github-policy-service
Copy link
Contributor

@protyay we've identified this Issue as a duplicate of another one that already exists. This specific instance is being closed in favor of tracking the concern over on the referenced Issue. Thanks for your report! Be sure to add your 👍 to the other issue to help raise the priority.

@microsoft-github-policy-service
Copy link
Contributor

@protyay we've identified this Issue as a duplicate of another one that already exists. This specific instance is being closed in favor of tracking the concern over on the referenced Issue. Thanks for your report! Be sure to add your 👍 to the other issue to help raise the priority.

@denelon denelon added this to the v1.5-Client milestone Feb 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Feature This is a feature request for the Windows Package Manager client. Resolution-Duplicate Issue is a duplicate
Projects
None yet
Development

No branches or pull requests

2 participants