[pacman-dev] [PATCH] makepkg: Don't interpret format specifiers in msg

Allan McRae allan at archlinux.org
Fri Feb 23 11:30:38 UTC 2018


On 23/02/18 21:18, Allan McRae wrote:
> On 23/02/18 20:42, Niklas Holm wrote:
>> Message string containing for example windows paths would have
>> unexpected behaviour. For example the message "Check C:\foo\bar" would
>> be printed as "Check C:<newline>  oar".
>>
>> Signed-off-by: Niklas Holm <jadedcyborg at gmail.com>
> 
> Did you test this patch?
> .
> 

Try something like:

msg() {
	local mesg=$1; shift
	printf -v mesg2 "${mesg}" "$@"
	printf "${GREEN}==>${ALL_OFF}${BOLD} %s${ALL_OFF}\n" "${mesg2}">&2
}


More information about the pacman-dev mailing list