Skip to content

Commit 48ce84b

Browse files
committed
Suppress innocuous error message from tag determination
The taskfile uses a Git command to get the current tag name. When there is no tag, it produces an error message every time a task is run: fatal: No tags can describe 'a58dfe994fdd94aa98ccc98b327d49f347384c2f'. Try --always, or create some tags. This error message is expected and doesn't impact the functionality of the taskfile, but it might cause confusion. The solution is to redirect the stderr from the command to /dev/null, which won't affect the functionality since the tag name is output on stdout.
1 parent a58dfe9 commit 48ce84b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

DistTasks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ tasks:
191191

192192
vars:
193193
VERSION:
194-
sh: echo "`git describe --tags --abbrev=0`"
194+
sh: echo "`git describe --tags --abbrev=0 2> /dev/null`"
195195
TIMESTAMP_SHORT:
196196
sh: echo "{{now | date "20060102"}}"
197197
DIST_LDFLAGS: >-

0 commit comments

Comments
 (0)