commitizen / commitizen/cz-cli

run on win10,prompt Could not find Git root folder.

Đang mở
#602 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
JavaScript
Star
17.5k
Fork
566
Merge trung bình
8 giờ 16 phút
Pull request đã merge (30 ngày)
1

Mô tả

git-cz run on win10 is broken,and prompt
The system cannot find the path specified.
fatal Error: Could not find Git root folder.

const getGitRootDir = () => {
const dir = execSync('git rev-parse --show-toplevel 2>/dev/null')
.toString()
.trim();

return dir;
};

![image](https://user-images.githubusercontent.com/46567143/51155446-7f453c80-18b2-11e9-90df-4ae49f5589e9.png)

![image](https://user-images.githubusercontent.com/46567143/51155472-96842a00-18b2-11e9-81b1-c401013060bd.png)
git rev-parse --show-toplevel 2>/dev/null
out-file : 未能找到路径“F:\dev\null”的一部分。
所在位置 行:1 字符: 1
+ git rev-parse --show-toplevel 2>/dev/null
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OpenError: (:) [Out-File], DirectoryNotFoundException
+ FullyQualifiedErrorId : FileOpenFailure,Microsoft.PowerShell.Commands.OutFileCommand

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.