capture stderr to show errors on failure

This commit is contained in:
Jeff Lindsay
2013-06-23 04:11:59 -07:00
parent 1184dc39c6
commit 7da64d77c1

View File

@@ -3,7 +3,7 @@ set -e
KEYNAME="$1"
indent() { sed "s/^/ /"; }
echo "-----> Booting EC2 instance..."
start=$(ec2-run-instances -k $1 ami-f3d1bb9a 2>/dev/null)
start=$(ec2-run-instances -k $1 ami-f3d1bb9a 2>&1 )
if [[ $? > 0 ]]; then
echo "$start"
exit