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() {