Proper bash string comparison
authorLorin Hochstein <lhochstein@netflix.com>
Fri, 13 Jan 2017 05:53:35 +0000 (21:53 -0800)
committerLorin Hochstein <lhochstein@netflix.com>
Fri, 13 Jan 2017 05:53:35 +0000 (21:53 -0800)
ch10/playbooks/library/can_reach_bash

index 36824b8..ccc2133 100644 (file)
@@ -7,8 +7,7 @@ port=`jq -r .port < $1`
 timeout=`jq -r .timeout < $1`
 
 # Default timeout=3
-
-if [[ $timeout -eq "null" ]]; then
+if [[ $timeout = null ]]; then
     timeout=3
 fi