Skip to content

Commit 9bf7f1f

Browse files
authored
Fix git version script trimming wrong command (#1128)
1 parent 4abd171 commit 9bf7f1f

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

gui/scripts/gitversion.mjs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,9 @@ import { exec as execCallback } from 'node:child_process';
44
const exec = promisify(execCallback);
55

66
const [commitHash, versionTag, gitClean] = await Promise.all([
7-
exec('git rev-parse --verify --short HEAD').then((res) =>
8-
res.stdout.trim().substring(1)
9-
),
7+
exec('git rev-parse --verify --short HEAD').then((res) => res.stdout.trim()),
108
exec('git --no-pager tag --sort -taggerdate --points-at HEAD').then((res) =>
11-
res.stdout.split('\n')[0].trim()
9+
res.stdout.split('\n')[0].trim().substring(1)
1210
),
1311
// If not empty then it's not clean
1412
exec('git status --porcelain').then((res) => (res.stdout ? false : true)),

0 commit comments

Comments
 (0)