Skip to content

Commit eaa1267

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 aa137d4 commit eaa1267

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: DistTasks.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ tasks:
191191

192192
vars:
193193
TAG:
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
VERSION: "{{if .CUSTOM_VERSION}}{{.CUSTOM_VERSION}}-{{.TIMESTAMP_SHORT}}{{else}}{{.TAG}}{{end}}"

0 commit comments

Comments
 (0)