Better phrasing for http_call error messages

This commit is contained in:
Michael Bridgen committed 2014-11-17 16:28:11 +00:00
1 parent 40de90a4c2
commit 61d2595c76
1 file changed
+3 -3
+3 -3
View File
@@ -271,19 +271,19 @@ detach() {
http_call() {
http_verb="$1"
if ! status=$(docker inspect --format='{{ .State.Running }} {{ .NetworkSettings.IPAddress }}' $2 2>/dev/null); then
echo "$2 is not a container; have you launched it?" >&2
echo "$2 container is not present; have you launched it?" >&2
exit 1
fi
case "$status" in
"true ")
echo "$2 has no IP address; is Docker networking enabled?" >&2
echo "$2 container has no IP address; is Docker networking enabled?" >&2
exit 1
;;
true*)
ip=$(echo $status | sed -e 's/true //')
;;
*)
echo "$2 is not running." >&2
echo "$2 container is not running." >&2
exit 1
;;
esac