From 81218e101bd93bbedc99e6822cc3c60ea71d8490 Mon Sep 17 00:00:00 2001 From: "Zhuohuan LI (CARPE DIEM)" Date: Fri, 4 Nov 2016 22:41:08 +0800 Subject: [PATCH] only show git hash version in ts-node mode --- src/wechaty.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wechaty.ts b/src/wechaty.ts index f0dc60e0..323ec3bd 100644 --- a/src/wechaty.ts +++ b/src/wechaty.ts @@ -93,7 +93,7 @@ export class Wechaty extends EventEmitter implements Sayable { public version(forceNpm = false) { // TODO: use git rev-parse HEAD ? - const dotGitPath = path.join(__dirname, '..', '..', '.git') // `/dist/src/../../.git` + const dotGitPath = path.join(__dirname, '..', '.git') // only for ts-node, not for dist const gitLogCmd = 'git' const gitLogArgs = ['log', '--oneline', '-1'] -- GitLab