无法设置输入流:无法将IO流设置为原始终端:句柄无效

时间:2018-09-23 10:24:40

标签: git githooks git-husky

我正在尝试使用“沙哑”来实现git钩子。我将husky安装为依赖开发人员,并在scripts对象中包含了一个命令。当我尝试运行命令“ git commit ”时,出现以下错误:

 $git commit -m "first commit"
unable to setup input stream: unable to set IO streams as raw terminal: The 
handle is invalid.  

我的package.json文件如下:

    {
  "name": "project",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "precommit":"npm run test"
  },
  "author": "",
  "license": "ISC",
  "devDependencies": {
    "husky": "~1.0.0-rc.15"
  }
}

我的期望是运行测试命令,但出现错误。

请帮助!

预先感谢

0 个答案:

没有答案