Skip to content

Commit

Permalink
Proper Bash check for missing value
Browse files Browse the repository at this point in the history
Changing a check for OPENSHIFT_VERSION variable that works even
if that variable isn't declared.
  • Loading branch information
cardil authored and praveenkumar committed Oct 22, 2019
1 parent 7c468bd commit f4836af
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
id_rsa_crc
id_rsa_crc.pub
crc-tmp-install-data
openshift-install
2 changes: 1 addition & 1 deletion snc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ SSH="ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i id_rsa_c
# If user defined the OPENSHIFT_VERSION environment variable then use it.
# Otherwise use the tagged version if available
function get_openshift_version {
if [ ${OPENSHIFT_VERSION} != "" ]; then
if [ "${OPENSHIFT_VERSION}" != "" ]; then
OPENSHIFT_RELEASE_VERSION=$OPENSHIFT_VERSION
else
OPENSHIFT_RELEASE_VERSION=$(git describe --exact-match --tags HEAD 2>/dev/null)
Expand Down

0 comments on commit f4836af

Please sign in to comment.