* [PATCH v1] travis-ci: printf $STATUS as string
@ 2017-04-26 19:39 Lars Schneider
2017-04-26 19:49 ` Johannes Schindelin
0 siblings, 1 reply; 2+ messages in thread
From: Lars Schneider @ 2017-04-26 19:39 UTC (permalink / raw)
To: git; +Cc: Johannes.Schindelin
If the $STATUS variable contains a "%" character then printf will
interpret that as invalid format string. Fix this by formatting $STATUS
as string.
Signed-off-by: Lars Schneider <larsxschneider@gmail.com>
---
Notes:
Base Ref: master
Web-Diff: https://github.com/larsxschneider/git/commit/f08d4dc6a0
Checkout: git fetch https://github.com/larsxschneider/git travisci/win-fix-v1 && git checkout f08d4dc6a0
ci/run-windows-build.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ci/run-windows-build.sh b/ci/run-windows-build.sh
index 4e3a50b60e..e043440799 100755
--- a/ci/run-windows-build.sh
+++ b/ci/run-windows-build.sh
@@ -55,7 +55,7 @@ while true
do
LAST_STATUS=$STATUS
STATUS=$(gfwci "action=status&buildId=$BUILD_ID")
- test "$STATUS" = "$LAST_STATUS" || printf "\nStatus: $STATUS "
+ test "$STATUS" = "$LAST_STATUS" || printf "\nStatus: %s " "$STATUS"
printf "."
case "$STATUS" in
base-commit: e2cb6ab84c94f147f1259260961513b40c36108a
--
2.12.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v1] travis-ci: printf $STATUS as string
2017-04-26 19:39 [PATCH v1] travis-ci: printf $STATUS as string Lars Schneider
@ 2017-04-26 19:49 ` Johannes Schindelin
0 siblings, 0 replies; 2+ messages in thread
From: Johannes Schindelin @ 2017-04-26 19:49 UTC (permalink / raw)
To: Lars Schneider; +Cc: git
Hi,
On Wed, 26 Apr 2017, Lars Schneider wrote:
> If the $STATUS variable contains a "%" character then printf will
> interpret that as invalid format string. Fix this by formatting $STATUS
> as string.
>
> Signed-off-by: Lars Schneider <larsxschneider@gmail.com>
ACK.
For reference, the status should always be a single all-ASCII word, but
sometimes it looks as if there is a server error that returns a full-blown
HTML error page (including a style that contains something like 'width:
10%;' which would be misinterpreted by printf as a format string).
Ciao,
Dscho
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-04-26 19:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-26 19:39 [PATCH v1] travis-ci: printf $STATUS as string Lars Schneider
2017-04-26 19:49 ` Johannes Schindelin
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).