Skip to content

Commit f4836af

Browse files
cardilpraveenkumar
authored andcommitted
Proper Bash check for missing value
Changing a check for OPENSHIFT_VERSION variable that works even if that variable isn't declared.
1 parent 7c468bd commit f4836af

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
id_rsa_crc
2+
id_rsa_crc.pub
3+
crc-tmp-install-data
4+
openshift-install

snc.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ SSH="ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i id_rsa_c
1717
# If user defined the OPENSHIFT_VERSION environment variable then use it.
1818
# Otherwise use the tagged version if available
1919
function get_openshift_version {
20-
if [ ${OPENSHIFT_VERSION} != "" ]; then
20+
if [ "${OPENSHIFT_VERSION}" != "" ]; then
2121
OPENSHIFT_RELEASE_VERSION=$OPENSHIFT_VERSION
2222
else
2323
OPENSHIFT_RELEASE_VERSION=$(git describe --exact-match --tags HEAD 2>/dev/null)

0 commit comments

Comments
 (0)