From 34a490725f2e9f5cb1f19ffe3e02f11d2de6f1d5 Mon Sep 17 00:00:00 2001 From: Eric Amodio Date: Mon, 16 Oct 2017 14:53:23 -0400 Subject: [PATCH] Fixes missing git command logging --- src/git/git.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/git/git.ts b/src/git/git.ts index 496d96b..abb4070 100644 --- a/src/git/git.ts +++ b/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);