Fix issue with creating new projects on Windows#674
Open
brycepg wants to merge 1 commit intopython-poetry:mainfrom
Open
Fix issue with creating new projects on Windows#674brycepg wants to merge 1 commit intopython-poetry:mainfrom
brycepg wants to merge 1 commit intopython-poetry:mainfrom
Conversation
3db2ea8 to
c6fc8c1
Compare
The previous code contained a bug where git couldn't reside in relative subdirectory. It appears to have done this in attempt to get the absolute path of the git executable. Instead, I just use resolve to resolve potential symlinks, etc.
Author
|
Do we want a regression test? |
Member
We always want a test if it is feasible. 😄 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The previous code contained a bug where git couldn't reside in a relative subdirectory.
This change allows git to be installed in the user directory while avoiding git.exe from being injected via the current directory
For example the package manager scoop installes
git.exeat%userprofile%/scoop/shims/git.exewhich would previously cause poetry to fail.I'd be also willing to write some code to enumerate %PATH% to find git.exe instead of using
where.exe. That would fix an additional edge case of having the current directory in PATH with git.exe in it and it also being the cwd.Resolves: python-poetry/poetry#7320