Bug#766180: /usr/bin/annotate-output errors for date format with spaces
Sandro Mani
manisandro at gmail.com
Tue Oct 21 11:19:32 UTC 2014
Package: devscripts
Version: 2.14.10
From https://bugzilla.redhat.com/show_bug.cgi?id=1082680:
/usr/bin/annotate-output does not handle date formats with spaces. I.e.:
$ /usr/bin/annotate-output "+%F %T" date
date: extra operand ‘%T’
Try 'date --help' for more information.
I: Started date
date: extra operand ‘%T’
Try 'date --help' for more information.
O: Mon Mar 31 11:25:40 EDT 2014
date: extra operand ‘%T’
Try 'date --help' for more information.
I: Finished with exitcode 0
Patch suggested by original reporter:
$ diff /usr/bin/annotate-output /usr/bin/annotate-output.new
28c28
< echo "`date ${FMT}` $1: $line"
---
> printf "%s %s: %s\n" "$(date "$FMT")" "$1" "$line"
78c78
< echo "`date ${FMT}` I: Started $@"
---
> addtime I <<< "Started $*"
83c83
< echo "`date ${FMT}` I: Finished with exitcode $EXIT"
---
> addtime I <<< "Finished with exitcode $EXIT"
More information about the devscripts-devel
mailing list