Error: spawn git ENOENT

NeilZhang
NeilZhang
管理员
140
文章
106.8千
浏览
Life评论547字数 187阅读0分37秒阅读模式

Suddenly, I began to get such pop-up error message in the VSC and when I checked the output of extension, I got below more information:

[ 23:14:53 | command ] git rev-parse --show-toplevel
[ 23:14:53 | critical ] Error: spawn git ENOENT
[ 23:14:53 | info ] File "f:\GitLab\v2\models\class\stockadjustment.php" is not a decendant of a git repository
[ 23:15:23 | info ] Will not try to blame file "\extension-output-#3" as it is outside of the current workspace
[ 23:17:47 | command ] git rev-parse --show-toplevel
[ 23:17:47 | critical ] Error: spawn git ENOENT
[ 23:17:47 | info ] File "f:\GitLab\v2\models\class\refund.php" is not a decendant of a git repository

I tried to find solution through Google while most of the search results were not match my issue. When I clicked every file or maybe every line, I would get such error message so it was really annoying.

Just now, I found below way:

hexo部署问题:Error: spawn git ENOENT

I recalled I did not allow to add git command to the PATH environment parameter when I installed the Git program, so I added it to my user environment, then I restarted the VSC and such error message did go.

 

 
  • 本文由 NeilZhang 发表于26/10/2018 01:17:34
  • Repost please keep this link: https://www.dbcloudsvc.com/blogs/life/error-spawn-git-enoent/
匿名

发表评论

匿名网友
:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:
确定