浏览代码

Fixes missing git command logging

main
Eric Amodio 7 年前
父节点
当前提交
34a490725f
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. +2
    -1
      src/git/git.ts

+ 2
- 1
src/git/git.ts 查看文件

@ -64,6 +64,8 @@ async function gitCommandCore(options: GitCommandOptions, ...args: any[]): Promi
// See https://stackoverflow.com/questions/4144417/how-to-handle-asian-characters-in-file-names-in-git-on-os-x
args.splice(0, 0, '-c', 'core.quotepath=false', '-c', 'color.ui=false');
Logger.log('git', ...args, ` cwd='${options.cwd}'`);
const opts = { encoding: 'utf8', ...options };
const s = await spawnPromise(git.path, args, {
cwd: options.cwd,
@ -71,7 +73,6 @@ async function gitCommandCore(options: GitCommandOptions, ...args: any[]): Promi
encoding: (opts.encoding === 'utf8') ? 'utf8' : 'binary'
} as SpawnOptions);
Logger.log('git', ...args, ` cwd='${options.cwd}'`);
if (opts.encoding === 'utf8' || opts.encoding === 'binary') return s;
return iconv.decode(Buffer.from(s, 'binary'), opts.encoding);

正在加载...
取消
保存