首页 > 为什么 nodejs execFile 部分结果在 stderr 中

为什么 nodejs execFile 部分结果在 stderr 中

使用 execFile 调用一个 shell 脚本,脚本中执行git pull命令,结果有一部分却是在 stderr 中。


  1. stderr是错误输出

  2. 试着执行脚本./scripts/pull.sh [repositoryLocation] [repositoryCloneUrl] 2>err.log
    当然两个[]参数要替换成你真正使用的地址

  3. 查看err.log是否也存在日志

  4. 如果有,那么你的脚本可能有问题,或者git pull命令认为你的执行方式有错误

【热门文章】
【热门文章】