Skip to content

Commit d4874cd

Browse files
committed
Fix curl error handling - avoid concatenated error codes
1 parent f929b4a commit d4874cd

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

.github/workflows/deployment-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,9 +142,9 @@ jobs:
142142
# But once Tomcat IS ready, if the extension isn't, that's the bug!
143143
for i in {1..60}; do
144144
echo "Attempt $i..."
145-
HTTP_CODE=$(curl -s -o /tmp/response.txt -w "%{http_code}" http://127.0.0.1:8888/test-slow-startup.cfm 2>/dev/null || echo "000")
145+
HTTP_CODE=$(curl -s -o /tmp/response.txt -w "%{http_code}" http://127.0.0.1:8888/test-slow-startup.cfm 2>/dev/null) || HTTP_CODE="000"
146146
echo "HTTP Code: $HTTP_CODE"
147-
if [ "$HTTP_CODE" != "000" ]; then
147+
if [ "$HTTP_CODE" != "000" ] && [ -f /tmp/response.txt ]; then
148148
# Got a response from Tomcat
149149
echo "=== Response ==="
150150
cat /tmp/response.txt

.vscode/settings.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"workbench.colorCustomizations": {
3+
"activityBar.background": "#3B1A68",
4+
"titleBar.activeBackground": "#532592",
5+
"titleBar.activeForeground": "#FBF9FE"
6+
}
7+
}

0 commit comments

Comments
 (0)