Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

无法正常获取 git email 或 git username #583

Open
liuliudada-w opened this issue Jul 14, 2023 · 0 comments
Open

无法正常获取 git email 或 git username #583

liuliudada-w opened this issue Jul 14, 2023 · 0 comments

Comments

@liuliudada-w
Copy link

描述bug(必填)

git config user.email 没有被正确替换,
实际输出

/*
 * @Author: error: git config user.email & please set dead value or install git
 */

猜测原因
感觉可能和 vscode 插件中执行 git 命令异常有关,可能是没有权限,或者是 zsh 的配置问题,存疑。

} catch (err) {

这里把错误 catch 住了,但是没有把实际的 err 抛出来,建议这里把错误抛出来,方便用户自查问题。

注释设置(必填):

VsCode设置:

"fileheader.customMade": {
    "Author": "git config user.email", // 同时获取用户名与邮箱
    "Date": "Do not edit", 
    "LastEditors": "git config user.email",     
    "LastEditTime": "Do not edit",
    "Description": "",
  },
  "fileheader.configObj": {

    "createFileTime": true,
    "language": {
      "languagetest": {
        "head": "/$$",
        "middle": " $ @",
        "end": " $/",
        "functionSymbol": {
          "head": "/** ",
          "middle": " * @",
          "end": " */"
        },
        "functionParams": "js"
      }
    },
    "autoAdd": true,
    "autoAddLine": 100,
    "autoAlready": true,
    "annotationStr": {
      "head": "/*",
      "middle": " * @",
      "end": " */",
      "use": false
    },
    "headInsertLine": {
      "php": 2,
      "sh": 2
    },
    "beforeAnnotation": {
      "文件后缀": "该文件后缀的头部注释之前添加某些内容"
    },
    "afterAnnotation": {
      "文件后缀": "该文件后缀的头部注释之后添加某些内容"
    },
    "specialOptions": {
      "特殊字段": "自定义比如LastEditTime/LastEditors"
    },
    "switch": {
      "newlineAddAnnotation": true
    },
    "supportAutoLanguage": [],
    "prohibitAutoAdd": [
      "json"
    ],
    "folderBlacklist": [
      "node_modules",
      "文件夹禁止自动添加头部注释"
    ],
    "prohibitItemAutoAdd": [
      "项目的全称, 整个项目禁止自动添加头部注释, 可以使用快捷键添加"
    ],
    "moveCursor": true,
    "dateFormat": "YYYY-MM-DD HH:mm:ss",
    "atSymbol": [
      "@",
      "@"
    ],
    "atSymbolObj": {
      "文件后缀": [
        "头部注释@符号",
        "函数注释@符号"
      ]
    },
    "colon": [
      ": ",
      ": "
    ],
    "colonObj": {
      "文件后缀": [
        "头部注释冒号",
        "函数注释冒号"
      ]
    },
    "filePathColon": "路径分隔符替换",
    "showErrorMessage": false,
    "writeLog": false,
    "wideSame": false,
    "wideNum": 13,
    "functionWideNum": 0,
    "CheckFileChange": false,
    "createHeader": false,
    "useWorker": false,
    "designAddHead": false,
    "headDesignName": "random",
    "headDesign": false,
    "cursorModeInternalAll": {},
    "openFunctionParamsCheck": true,
    "functionParamsShape": [
      "{",
      "}"
    ],
    "functionBlankSpaceAll": {},
    "functionTypeSymbol": "*",
    "typeParamOrder": "type param",
    "customHasHeadEnd": {},
    "throttleTime": 60000,
    "functionParamAddStr": "",
    "NoMatchParams": "no show param"
  }

文件后缀(必填):

*.ts

你得到的注释(必填):

你生成的注释为:

/*
 * @Author: error: git config user.email & please set dead value or install git
 */

预期的行为(必填):

预期得到的注释/行为:

问题相关(选填)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant