[pbuilder] 02/02: modules: _log(): properly pass arguments to printf
Mattia Rizzolo
mattia at debian.org
Fri Nov 25 14:19:21 UTC 2016
This is an automated email from the git hooks/post-receive script.
mattia pushed a commit to branch master
in repository pbuilder.
commit 7993496d0bf36eec5f0a1eaba0688e5bdd880ba6
Author: Mattia Rizzolo <mattia at debian.org>
Date: Fri Nov 25 15:16:37 2016 +0100
modules: _log(): properly pass arguments to printf
really I should have never done variable substitution in the main "format"
string... what was I thinking...
Gbp-Dch: Short
Thanks: Thorsten Glaser <tg at mirbsd.de> for noticing
Closes: #845438
---
pbuilder-modules | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/pbuilder-modules b/pbuilder-modules
index 8a3914a..4d5f942 100644
--- a/pbuilder-modules
+++ b/pbuilder-modules
@@ -100,16 +100,16 @@ _log() {
set -u
term_supports_colors # defines USECOLORS if not already set
local color="$1" ; shift
- local red='\033[0;31m'
- local yellow='\033[1;33m'
- local blue='\033[0;34m'
- local reset='\033[0m'
+ local red=$'\033[0;31m'
+ local yellow=$'\033[1;33m'
+ local blue=$'\033[0;34m'
+ local reset=$'\033[0m'
case "$USECOLORS" in
yes)
- printf "${!color}${*}${reset}\n"
+ printf "%s%s%s\n" "${!color}" "${*}" "${reset}"
;;
no)
- printf "${*}\n"
+ printf "%s\n" "${*}"
;;
*)
printf "malformed value of USECOLORS: [%s]\n" "$USECOLORS" >&2
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pbuilder/pbuilder.git
More information about the Pbuilder-maint
mailing list