fix: Git_Bash calculation error in windows powershell. #139
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 file sturcture of git it's looks like below in windows:
Makefile used the code below to calculate the path of "bash.exe".
But it used a wrong command
dir
.dir
is a command likels .
, even in windows. So user that using windows can not get a correct "Git_Bash". And now I have fixed this issue.Makefile 计算 bash.exe 路径的时候使用了一个叫
dir
的命令。这里的原意是想获取一个路径的目录名,例如 "/a/b/c.exe" -> "/a/b"。但dir
实际上相当于ls .
,就算在 windows 中也是这样。也就是说用错命令了。不过 windows 里也没有
dirname
命令,所以我用了其他的手段解决问题。