From 9e0afce1d9c547854b2382983b7867bcfba3fa11 Mon Sep 17 00:00:00 2001 From: pvincent Date: Sat, 27 Feb 2021 23:32:03 +0400 Subject: [PATCH] dirty > 0 --- vite.config.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vite.config.ts b/vite.config.ts index 4b04f83..88d527b 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -16,8 +16,8 @@ function buildVersion(): string { if (!isGitCommand()) { return version } - const dirty = execSync("git status -s | wc -l").toString() - return `${version}…${dirty}` + const dirty = Number(execSync("git status -s | wc -l").toString()) + return dirty > 0 ? `${version}…${dirty}` : version } function isGitCommand() {